Supervideo API docs

Images

Create and edit images. Same job object as videos.

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

ParameterInTypeDescription
Idempotency-Key requiredheaderstringRequired. 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-Regionheaderstring: us, eu, uk, inSame as data_region in the body.
Preferheaderstringwait=<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

FieldTypeDescription
model requiredstringModel id from GET /v1/models.
min length 1; max length 64
prompt requiredstringWhat to generate.
min length 1
sizestring or nullWIDTHxHEIGHT, for example 832x480. Or use resolution with aspect_ratio.
max length 16
resolutionstring or nullFor example 480p, 720p. See the model's resolutions.
max length 8
aspect_ratiostring or nullFor example 16:9. See the model's aspect_ratios.
max length 8
nintegerNumber of images. Only 1 for now.
min 1; max 1; default 1
seedinteger or nullThe same seed and request give the same result.
min 0; max 4294967295
negative_promptstring or nullWhat to avoid.
image_urlstring or nullOlder name of first_frame (an https URL or a file id). Required by /v1/images/edits.
response_formatstring or nullOnly url: results are links, never base64.
speedstring: fast, standard or nullfast 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_snumber or nullLongest 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
retentionstring: 7d, 14d, 28d, zdr or nullHow long to keep the output. Defaults to the account's setting.
data_regionstring: us, eu, uk, in or nullWhere to store the output. Only valid if it matches the account's region.
extra_bodyobject or nullModel-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

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

ParameterInTypeDescription
Idempotency-Key requiredheaderstringRequired. 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-Regionheaderstring: us, eu, uk, inSame as data_region in the body.
Preferheaderstringwait=<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

FieldTypeDescription
model requiredstringModel id from GET /v1/models.
min length 1; max length 64
prompt requiredstringWhat to generate.
min length 1
sizestring or nullWIDTHxHEIGHT, for example 832x480. Or use resolution with aspect_ratio.
max length 16
resolutionstring or nullFor example 480p, 720p. See the model's resolutions.
max length 8
aspect_ratiostring or nullFor example 16:9. See the model's aspect_ratios.
max length 8
nintegerNumber of images. Only 1 for now.
min 1; max 1; default 1
seedinteger or nullThe same seed and request give the same result.
min 0; max 4294967295
negative_promptstring or nullWhat to avoid.
image_urlstring or nullOlder name of first_frame (an https URL or a file id). Required by /v1/images/edits.
response_formatstring or nullOnly url: results are links, never base64.
speedstring: fast, standard or nullfast 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_snumber or nullLongest 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
retentionstring: 7d, 14d, 28d, zdr or nullHow long to keep the output. Defaults to the account's setting.
data_regionstring: us, eu, uk, in or nullWhere to store the output. Only valid if it matches the account's region.
extra_bodyobject or nullModel-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

GET /v1/images

List images

Parameters

ParameterInTypeDescription
limitqueryinteger
min 1; max 100; default 20
afterquerystringReturn 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

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

ParameterInTypeDescription
job_id requiredpathstringThe image's id.
waitqueryintegerLong-poll: hold the request up to this many seconds until the job changes.
min 0; max 25; default 0
If-None-MatchheaderstringThe 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

StatusBodyWhen
200JobOK
304Not changed since the ETag you sent.
400Errorinvalid_request
401Errorunauthorized
404Errornot_found
429Errorrate_limited
503Errorcapacity_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

ParameterInTypeDescription
job_id requiredpathstringThe image's id.

Example

curl -X DELETE https://api.superveo.io/v1/images/img_... \
  -H "Authorization: Bearer $SUPERVIDEO_API_KEY"

Responses

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

ParameterInTypeDescription
job_id requiredpathstringThe image's id.

Example

curl -X GET https://api.superveo.io/v1/images/img_.../events \
  -H "Authorization: Bearer $SUPERVIDEO_API_KEY"

Responses

StatusBodyWhen
200text/event-streamAn event stream.
401Errorunauthorized
404Errornot_found
429Errorrate_limited, too_many_streams
503Errorcapacity_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

ParameterInTypeDescription
job_id requiredpathstringThe image's id.
variantquerystring: video, image, thumbnailthumbnail for the preview image.

Example

curl -X GET https://api.superveo.io/v1/images/img_.../content \
  -H "Authorization: Bearer $SUPERVIDEO_API_KEY"

Responses

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

ParameterInTypeDescription
job_id requiredpathstringThe image's id.

Example

curl -X POST https://api.superveo.io/v1/images/img_.../cancel \
  -H "Authorization: Bearer $SUPERVIDEO_API_KEY"

Responses