Supervideo API docs

Batches

Many requests in one call at the batch price.

POST /v1/batches

Create a batch

Up to 1000 video or image requests in one call, at the batch price. Either every request is valid and paid for, or none is created. Batch jobs run when GPUs are free, within the completion window.

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.

Request body

FieldTypeDescription
requests requiredarray of BatchItem1 to 1000 requests.
min items 1
completion_windowstring or null1h to 24h. Requests not started by then are cancelled and not charged. Default 24h.
max length 4
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.

Example

curl -X POST https://api.superveo.io/v1/batches \
  -H "Authorization: Bearer $SUPERVIDEO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "requests": [
    {
      "custom_id": "poster-1",
      "url": "/v1/images/generations",
      "body": {
        "model": "z-image",
        "prompt": "a poster of a red kite",
        "size": "1024x1024"
      }
    },
    {
      "custom_id": "poster-2",
      "url": "/v1/images/generations",
      "body": {
        "model": "flux2-klein",
        "prompt": "a red kite, watercolour",
        "aspect_ratio": "3:4"
      }
    }
  ],
  "completion_window": "24h"
}'
import os, uuid, requests

r = requests.request(
    "POST", "https://api.superveo.io/v1/batches",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERVIDEO_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),  # keep it to retry safely
    },
    json={
        "requests": [
            {
                "custom_id": "poster-1",
                "url": "/v1/images/generations",
                "body": {
                    "model": "z-image",
                    "prompt": "a poster of a red kite",
                    "size": "1024x1024"
                }
            },
            {
                "custom_id": "poster-2",
                "url": "/v1/images/generations",
                "body": {
                    "model": "flux2-klein",
                    "prompt": "a red kite, watercolour",
                    "aspect_ratio": "3:4"
                }
            }
        ],
        "completion_window": "24h"
    },
)
print(r.status_code, r.json())
const r = await fetch("https://api.superveo.io/v1/batches", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SUPERVIDEO_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(), // keep it to retry safely
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "requests": [
      {
        "custom_id": "poster-1",
        "url": "/v1/images/generations",
        "body": {
          "model": "z-image",
          "prompt": "a poster of a red kite",
          "size": "1024x1024"
        }
      },
      {
        "custom_id": "poster-2",
        "url": "/v1/images/generations",
        "body": {
          "model": "flux2-klein",
          "prompt": "a red kite, watercolour",
          "aspect_ratio": "3:4"
        }
      }
    ],
    "completion_window": "24h"
  }),
});
console.log(r.status, await r.json());

Responses

GET /v1/batches

List batches

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/batches \
  -H "Authorization: Bearer $SUPERVIDEO_API_KEY"

Responses

GET /v1/batches/{batch_id}

Get one batch

Parameters

ParameterInTypeDescription
batch_id requiredpathstringBatch id.

Example

curl -X GET https://api.superveo.io/v1/batches/batch_id \
  -H "Authorization: Bearer $SUPERVIDEO_API_KEY"

Responses

GET /v1/batches/{batch_id}/requests

List a batch's jobs

The batch's jobs in the order they were sent. Each is a normal job.

Parameters

ParameterInTypeDescription
batch_id requiredpathstringBatch id.
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/batches/batch_id/requests \
  -H "Authorization: Bearer $SUPERVIDEO_API_KEY"

Responses

POST /v1/batches/{batch_id}/cancel

Cancel a batch

Cancels the requests still queued. The ones already generating finish and are billed.

Parameters

ParameterInTypeDescription
batch_id requiredpathstringBatch id.

Example

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

Responses