API Docs
Image generations
Create prompt-to-image jobs
POST /api/v1/images/generations creates one to four images from a text
description. Required scope: images:generate.
JSON body
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
prompt | string | yes | — | Trimmed, 5–2,000 characters |
aspect_ratio | string | no | 1:1 | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5, or 21:9 |
resolution | string | no | 2K | 2K or 4K |
count | integer | no | 1 | 1–4 |
Unknown fields are rejected. The public request has no capability-routing options.
Credits
| Resolution | Credits per image |
|---|---|
2K | 5 |
4K | 20 |
The total reservation is the per-image cost multiplied by count. Credits are
reserved atomically when the job is accepted, settled on success, and released
on terminal failure.
cURL
curl https://sci-draw.com/api/v1/images/generations \
-H 'Authorization: Bearer sd_YOUR_KEY' \
-H 'Idempotency-Key: manuscript-42-panel-a' \
-H 'Prefer: wait=10' \
-H 'Content-Type: application/json' \
-d '{"prompt":"A labeled plant cell diagram","aspect_ratio":"4:3","resolution":"2K","count":1}'JavaScript
const response = await fetch('https://sci-draw.com/api/v1/images/generations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SCIDRAW_API_KEY}`,
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json'
Python
import os, uuid, requests
response = requests.post(
"https://sci-draw.com/api/v1/images/generations",
headers={
"Authorization": f"Bearer {os.environ['SCIDRAW_API_KEY']}"
Returns 202 while queued or processing, or 200 when bounded waiting reaches
a terminal state. See Jobs for the response schema and polling flow.

API Docs