Images
Create and edit images. Same job object as videos.
- POST
/v1/images/generationsCreate an image - POST
/v1/images/editsEdit an image - GET
/v1/imagesList images - GET
/v1/images/{job_id}Get one image - DELETE
/v1/images/{job_id}Delete a finished image - GET
/v1/images/{job_id}/eventsStream a image's progress - GET
/v1/images/{job_id}/contentDownload the image - POST
/v1/images/{job_id}/cancelCancel a queued image
POST /v1/images/generations
Create an image
Waits for the image up to Prefer: wait=<s> and answers 200 with the finished job. If it is not ready by then the answer is 202 with a job to poll, exactly like a video.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Required. A new key for each new request, for example a UUID. Send the same key to retry safely: the first result is returned again (200 with Idempotent-Replayed: true) and nothing is created or charged twice. Without it the answer is 400 idempotency_key_required.min length 1; max length 255 |
X-Data-Region | header | string: us, eu, uk, in | Same as data_region in the body. |
Prefer | header | string | wait=<seconds>: how long to hold the request for the finished image (default 30, at most 60). After that the answer is 202 with a job to poll. |
Request body
| Field | Type | Description |
|---|---|---|
model required | string | Model id from GET /v1/models. min length 1; max length 64 |
prompt required | string | What to generate. min length 1 |
size | string or null | WIDTHxHEIGHT, for example 832x480. Or use resolution with aspect_ratio.max length 16 |
resolution | string or null | For example 480p, 720p. See the model's resolutions.max length 8 |
aspect_ratio | string or null | For example 16:9. See the model's aspect_ratios.max length 8 |
n | integer | Number of images. Only 1 for now. min 1; max 1; default 1 |
seed | integer or null | The same seed and request give the same result. min 0; max 4294967295 |
negative_prompt | string or null | What to avoid. |
image_url | string or null | Older name of first_frame (an https URL or a file id). Required by /v1/images/edits. |
response_format | string or null | Only url: results are links, never base64. |
speed | string: fast, standard or null | fast has priority in the queue: it goes ahead of standard jobs when GPUs are busy. It is not a promised start time. It costs fast_multiplier times the price. |
max_wait_s | number or null | Longest wait, in seconds, for a GPU to START this job. If it cannot start that soon the answer is 503 with Retry-After at once; nothing is queued or charged. min 5; max 1800 |
retention | string: 7d, 14d, 28d, zdr or null | How long to keep the output. Defaults to the account's setting. |
data_region | string: us, eu, uk, in or null | Where to store the output. Only valid if it matches the account's region. |
extra_body | object or null | Model-specific options that have no field of their own. |
Example
curl -X POST https://api.superveo.io/v1/images/generations \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Prefer: wait=30" \
-H "Content-Type: application/json" \
-d '{
"model": "z-image",
"prompt": "a cat on a windowsill",
"size": "1024x1024"
}'import os, uuid, requests
r = requests.request(
"POST", "https://api.superveo.io/v1/images/generations",
headers={
"Authorization": f"Bearer {os.environ['SUPERVIDEO_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()), # keep it to retry safely
"Prefer": "wait=30",
},
json={
"model": "z-image",
"prompt": "a cat on a windowsill",
"size": "1024x1024"
},
)
print(r.status_code, r.json())const r = await fetch("https://api.superveo.io/v1/images/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SUPERVIDEO_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(), // keep it to retry safely
Prefer: "wait=30",
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "z-image",
"prompt": "a cat on a windowsill",
"size": "1024x1024"
}),
});
console.log(r.status, await r.json());Responses
| Status | Body | When |
|---|---|---|
| 200 | Job | OK |
| 202 | Job | Not finished within the wait: poll the job. |
| 400 | Error | idempotency_key_required, invalid_input_url, invalid_request, invalid_seconds, invalid_size, unsupported_mode |
| 401 | Error | unauthorized |
| 402 | Error | insufficient_credits |
| 403 | Error | key_scope_denied, model_not_available_in_region |
| 404 | Error | model_not_found |
| 409 | Error | idempotency_conflict, idempotency_in_progress |
| 413 | Error | request_too_large |
| 422 | Error | content_rejected |
| 429 | Error | queue_full, rate_limited, too_many_jobs |
| 502 | Error | upstream_error |
| 503 | Error | capacity_unavailable, model_not_ready |
| 504 | Error | upstream_timeout |
POST /v1/images/edits
Edit an image
Like /v1/images/generations with an input image in image_url. JSON only: never multipart, never base64.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Required. A new key for each new request, for example a UUID. Send the same key to retry safely: the first result is returned again (200 with Idempotent-Replayed: true) and nothing is created or charged twice. Without it the answer is 400 idempotency_key_required.min length 1; max length 255 |
X-Data-Region | header | string: us, eu, uk, in | Same as data_region in the body. |
Prefer | header | string | wait=<seconds>: how long to hold the request for the finished image (default 30, at most 60). After that the answer is 202 with a job to poll. |
Request body
| Field | Type | Description |
|---|---|---|
model required | string | Model id from GET /v1/models. min length 1; max length 64 |
prompt required | string | What to generate. min length 1 |
size | string or null | WIDTHxHEIGHT, for example 832x480. Or use resolution with aspect_ratio.max length 16 |
resolution | string or null | For example 480p, 720p. See the model's resolutions.max length 8 |
aspect_ratio | string or null | For example 16:9. See the model's aspect_ratios.max length 8 |
n | integer | Number of images. Only 1 for now. min 1; max 1; default 1 |
seed | integer or null | The same seed and request give the same result. min 0; max 4294967295 |
negative_prompt | string or null | What to avoid. |
image_url | string or null | Older name of first_frame (an https URL or a file id). Required by /v1/images/edits. |
response_format | string or null | Only url: results are links, never base64. |
speed | string: fast, standard or null | fast has priority in the queue: it goes ahead of standard jobs when GPUs are busy. It is not a promised start time. It costs fast_multiplier times the price. |
max_wait_s | number or null | Longest wait, in seconds, for a GPU to START this job. If it cannot start that soon the answer is 503 with Retry-After at once; nothing is queued or charged. min 5; max 1800 |
retention | string: 7d, 14d, 28d, zdr or null | How long to keep the output. Defaults to the account's setting. |
data_region | string: us, eu, uk, in or null | Where to store the output. Only valid if it matches the account's region. |
extra_body | object or null | Model-specific options that have no field of their own. |
Example
curl -X POST https://api.superveo.io/v1/images/edits \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Prefer: wait=30" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-edit",
"prompt": "make it snow",
"image_url": "file_0123456789abcdef0123456789abcdef"
}'import os, uuid, requests
r = requests.request(
"POST", "https://api.superveo.io/v1/images/edits",
headers={
"Authorization": f"Bearer {os.environ['SUPERVIDEO_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()), # keep it to retry safely
"Prefer": "wait=30",
},
json={
"model": "qwen-image-edit",
"prompt": "make it snow",
"image_url": "file_0123456789abcdef0123456789abcdef"
},
)
print(r.status_code, r.json())const r = await fetch("https://api.superveo.io/v1/images/edits", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SUPERVIDEO_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(), // keep it to retry safely
Prefer: "wait=30",
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "qwen-image-edit",
"prompt": "make it snow",
"image_url": "file_0123456789abcdef0123456789abcdef"
}),
});
console.log(r.status, await r.json());Responses
| Status | Body | When |
|---|---|---|
| 200 | Job | OK |
| 202 | Job | Not finished within the wait: poll the job. |
| 400 | Error | idempotency_key_required, invalid_input_url, invalid_request, invalid_seconds, invalid_size, unsupported_mode |
| 401 | Error | unauthorized |
| 402 | Error | insufficient_credits |
| 403 | Error | key_scope_denied, model_not_available_in_region |
| 404 | Error | model_not_found |
| 409 | Error | idempotency_conflict, idempotency_in_progress |
| 413 | Error | request_too_large |
| 422 | Error | content_rejected |
| 429 | Error | queue_full, rate_limited, too_many_jobs |
| 502 | Error | upstream_error |
| 503 | Error | capacity_unavailable, model_not_ready |
| 504 | Error | upstream_timeout |
GET /v1/images
List images
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | integer | min 1; max 100; default 20 |
after | query | string | Return what comes after this id (last_id of the previous page). |
Example
curl -X GET https://api.superveo.io/v1/images \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | JobList | OK |
| 400 | Error | invalid_request |
| 401 | Error | unauthorized |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
GET /v1/images/{job_id}
Get one image
Read the job until status is final. Three ways to wait: sleep poll_after_ms between reads, long-poll with ?wait=25, or use the /events stream.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
job_id required | path | string | The image's id. |
wait | query | integer | Long-poll: hold the request up to this many seconds until the job changes. min 0; max 25; default 0 |
If-None-Match | header | string | The ETag of your last read. Answers 304 when the job has not changed. |
Example
curl -X GET https://api.superveo.io/v1/images/img_... \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | Job | OK |
| 304 | Not changed since the ETag you sent. | |
| 400 | Error | invalid_request |
| 401 | Error | unauthorized |
| 404 | Error | not_found |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
DELETE /v1/images/{job_id}
Delete a finished image
Removes the media now and hides the job. No refund. Only for a finished job.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
job_id required | path | string | The image's id. |
Example
curl -X DELETE https://api.superveo.io/v1/images/img_... \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 204 | Done. No body. | |
| 401 | Error | unauthorized |
| 404 | Error | not_found |
| 409 | Error | cannot_cancel_in_progress, job_not_finished |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
GET /v1/images/{job_id}/events
Stream a image's progress
Server-sent events: status, stage and progress as they change, then one job event with the final job, and the stream ends. A comment line is sent every 15 seconds to keep it open.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
job_id required | path | string | The image's id. |
Example
curl -X GET https://api.superveo.io/v1/images/img_.../events \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | text/event-stream | An event stream. |
| 401 | Error | unauthorized |
| 404 | Error | not_found |
| 429 | Error | rate_limited, too_many_streams |
| 503 | Error | capacity_unavailable |
GET /v1/images/{job_id}/content
Download the image
Redirects to a signed link that works for 1 hour (15 minutes for a zdr account). X-Signed-Url-Expires-At says when it stops.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
job_id required | path | string | The image's id. |
variant | query | string: video, image, thumbnail | thumbnail for the preview image. |
Example
curl -X GET https://api.superveo.io/v1/images/img_.../content \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 302 | Redirect to a signed download link. | |
| 400 | Error | invalid_request |
| 401 | Error | unauthorized |
| 404 | Error | not_found |
| 409 | Error | media_not_ready |
| 410 | Error | data_removed |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
POST /v1/images/{job_id}/cancel
Cancel a queued image
Works only while the job is queued: the hold is released and it costs nothing. Once it is generating the answer is 409 and the job runs to the end and is billed. A finished job is returned as it is.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
job_id required | path | string | The image's id. |
Example
curl -X POST https://api.superveo.io/v1/images/img_.../cancel \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | Job | OK |
| 401 | Error | unauthorized |
| 404 | Error | not_found |
| 409 | Error | cannot_cancel_in_progress |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |