Quotaflow
llms.txtOpenAPIDashboard
OpenAI-compatible

Videos

Create video generation tasks with OpenAI-compatible authentication and a task-style response shape. Video generation is async: create a task, store the id, and poll for completion.

Quotaflow Video Generator
Quotaflow Video Generator
Video generation is key-enabled. The default all-model key includes video, as does a key created for a video model. Only keys with video access list video models from /models; keys without video access cannot create video tasks.

When to use this page

Use this page when you need Seedance, Wan, Kling, or MiniMax H3 video generation with production-friendly status polling. For model-specific guidance, see Seedance 2.0 Fast, Wan 3.0 Video, Kling 4.0, and MiniMax H3.

Endpoints

POST https://api.quotaflow.ai/openai/v1/videos
GET https://api.quotaflow.ai/openai/v1/videos
GET https://api.quotaflow.ai/openai/v1/videos/{task_id}
DELETE https://api.quotaflow.ai/openai/v1/videos/{task_id}
GET https://api.quotaflow.ai/openai/v1/videos/{task_id}/content

Supported models

Model iddurationSecondsresolutionDefault durationReference videos per requestReference images per request
bytedance/seedance-2.04–15480p, 720p, 1080p, 4k5up to 3—
bytedance/seedance-2.0-fast4–15480p, 720p5up to 3up to 9
bytedance/seedance-2.0-mini4–15480p, 720p5up to 3up to 9
bytedance/seedance-2.54–30480p, 720p, 1080p-1 (the model chooses)up to 10up to 30

Seedance lines

Seedance is served on two lines. Your API key is sold on one of them; /models lists the same Seedance ids on both, and a request cannot pick a line. To move a key to the other line, contact Quotaflow.

LineWhere the video is generatedNotes
bytedance/seedance (default)ByteDance Ark, mainland China
bytedance-oversea/seedanceByteDance Ark, outside mainland China (Southeast Asia)Same models, parameters and task API

Content moderation runs on each line's own upstream, so the same prompt can pass on one line and fail on the other; both report the same error.code family (see Fetch task status or result). Real-person references work on both lines.

Wan and Kling

Model iddurationSecondsresolutionaspect_ratioDefaultsOther fields
alibaba/wan3.0-video2–30480p, 720p, 1080padaptive, 16:9, 9:16, 1:1, 4:3, 3:4, 21:95 s, 1080p, adaptivegenerate_audio (when omitted, the model's default applies)
kuaishou/kling-4.03–30720p, 1080p16:9, 9:16, 1:1, 21:95 s, 720p, 16:9—
kuaishou/kling-4.0-flash3–20720p16:9, 9:16, 1:1, 21:95 s, 720p, 16:9—

MiniMax H3

Model iddurationSecondsresolutionaspect_ratioDefaultsModes
minimax/h34–15768p, 2ktext_to_video: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16; image_reference: those or adaptive; ignored with a frame5 s, 768p, 16:9 (adaptive on image_reference)text_to_video, image_to_video, first_last_frame, image_reference (up to 9 images)

Call /models with your production key for the exact list enabled for your account.

Modes

Set mode to declare what the request carries. The mode and the inputs must agree; a mismatch is refused with 400.

modeInputs
text_to_video (default)prompt (required). No frames, no reference videos.
image_to_videofirst_frame_url, and no last_frame_url.
first_last_frameBoth first_frame_url and last_frame_url.
video_referencereference_video_urls, no frames.
video_editreference_video_urls, no frames. On bytedance/seedance-2.5, aspect_ratio must be adaptive and durationSeconds must be -1.
video_extendExactly one reference_video_urls entry, no frames, aspect_ratio adaptive.
image_referencereference_image_urls, no frames, no reference videos. bytedance/seedance-2.0-fast, bytedance/seedance-2.0-mini, bytedance/seedance-2.5 and minimax/h3 only.

Create a video task

curl https://api.quotaflow.ai/openai/v1/videos \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bytedance/seedance-2.0-fast",
    "prompt": "A cinematic drone shot over a coastal city at sunrise.",
    "durationSeconds": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "max_cost_usd": 2
  }'

max_cost_usd is required: it is the most you authorise this task to cost, in USD, and that amount is held from your balance when the task is created. A successful create answers 202 with the task id:

{ "id": "TASK_ID", "status": "pending" }

Image-to-video

curl https://api.quotaflow.ai/openai/v1/videos \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bytedance/seedance-2.0",
    "mode": "image_to_video",
    "prompt": "Slow camera push-in, soft studio lighting.",
    "first_frame_url": "data:image/png;base64,iVBORw0KGgo...",
    "durationSeconds": 5,
    "resolution": "4k",
    "aspect_ratio": "adaptive",
    "max_cost_usd": 5
  }'

Real-person references

A video that shows a real person's face needs that person's consent first. Either the person passes a liveness check (steps 1–2), or you register the portrait on your own declaration that you hold the person's permission (step 2b). The portrait is then registered as an asset and referenced by id. Verification and registration are free; the generation is billed like any other task.

Real-person references are open to every API key sold the Seedance line. A key without it gets 404 from the endpoints below and 400 for an asset:// reference.
POST https://api.quotaflow.ai/openai/v1/videos/person-verifications
GET https://api.quotaflow.ai/openai/v1/videos/person-verifications/{id}
POST https://api.quotaflow.ai/openai/v1/videos/person-assets
GET https://api.quotaflow.ai/openai/v1/videos/person-assets/{id}
DELETE https://api.quotaflow.ai/openai/v1/videos/person-assets/{id}

1. Verify the person. Create a verification session and send the person to verification_url to complete the liveness check on their phone. The request body is {}.

curl https://api.quotaflow.ai/openai/v1/videos/person-verifications \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
{ "id": "pv_…", "status": "pending", "verification_url": "https://…" }

Poll GET /videos/person-verifications/{id} until status is verified. It stays pending while the check is unfinished; rejected means the check failed.

2. Register the portrait. Send a public https:// link to the person's image with the verified session's id.

curl https://api.quotaflow.ai/openai/v1/videos/person-assets \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/portrait.jpg", "name": "Presenter", "person_verification_id": "pv_…" }'
{ "id": "pa_…", "status": "processing" }

status is processing, active, or failed. Poll GET /videos/person-assets/{id} until it is active; failed means the image was not accepted. Registering before the session is verified answers 409 CONFLICT.

2b. Register on your consent, without a liveness check. Instead of person_verification_id, send "consent": true. By sending it you declare that you hold the depicted person's permission to create video of them; the platform records your organization, API key and the time of the declaration with the asset.

curl https://api.quotaflow.ai/openai/v1/videos/person-assets \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/portrait.jpg", "name": "Presenter", "consent": true }'

The answer and the polling are the same as in step 2. A failed asset carries error.code when the reason is known, for example DownloadFailed (the link could not be fetched: use a direct, publicly reachable image link, not a sharing page; the image is fetched from mainland China, so links on hosts unreachable there, such as Google Drive, fail). Send exactly one of person_verification_id or "consent": true; a body with neither, with both, or with any other consent value answers 400.

3. Generate. Reference the asset in an image_reference task on bytedance/seedance-2.0-fast, bytedance/seedance-2.0-mini or bytedance/seedance-2.5:

curl https://api.quotaflow.ai/openai/v1/videos \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bytedance/seedance-2.0-mini",
    "mode": "image_reference",
    "prompt": "The presenter waves at the camera in a bright studio.",
    "reference_image_urls": ["asset://pa_…"],
    "durationSeconds": 5,
    "resolution": "720p",
    "max_cost_usd": 2
  }'

Then poll and download as below. Verification and asset ids belong to the organization that created them; another organization's ids answer 404 (or 400 in reference_image_urls).

Delete an asset. DELETE /videos/person-assets/{id} removes an asset registered on consent (step 2b) and answers { "id": "pa_…", "deleted": true }. Afterwards GET answers 404 and asset://pa_… in a new task answers 400. An asset registered through a liveness check (step 2) cannot be deleted through the API and answers 409.

Fetch task status or result

curl https://api.quotaflow.ai/openai/v1/videos/$TASK_ID \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY"

The task body carries id, status, created_at, and updated_at. status is one of pending, succeeded, failed, cancelled, or expired. A failed task carries error.code and error.message. On Seedance, error.code is the upstream content-safety code when the task failed on the content of your input or output: SensitiveContentDetected, or Input / Output + Text / Image / Video / Audio + SensitiveContentDetected, optionally suffixed .PolicyViolation, .PrivacyInformation or .DeepFake (for example InputImageSensitiveContentDetected.PrivacyInformation for a real face without a registered consent, or OutputVideoSensitiveContentDetected.PolicyViolation). Any other upstream failure reads upstream_task_failed. A request refused for its content at create time answers 400 and creates no task. On Seedance the body also carries the request's duration, resolution, ratio, and framespersecond, and a succeeded Seedance task carries usage (completion_tokens, total_tokens) when reported, last_frame_available, and the measured duration. Wan and Kling tasks carry only the fields above.

Instead of polling, set callback_url to a public https:// URL: once the task is terminal, Quotaflow POSTs the same task body to it.

List and cancel tasks

GET /videos lists your tasks from the last 7 days, newest first, as { "items": [...], "total": N }. Query parameters: page_num and page_size (1–500, default 20), filter.status, and filter.task_ids.

DELETE /videos/{task_id} cancels a task that is still queued: it becomes cancelled and its hold is released with no charge. A task that is already running or finished answers 409 task_not_cancellable. A task accepts one cancel attempt per 10 seconds; an earlier retry answers 429 with Retry-After.

Download the completed video

The content endpoint uses the same Bearer key as create and poll, and answers with a 302 redirect to the video file, so follow redirects:

curl -L https://api.quotaflow.ai/openai/v1/videos/$TASK_ID/content \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY" \
  --output video.mp4

Parameters

Unknown fields are refused with 400; send only the fields below.

FieldNotes
modelRequired. One of the ids above that /models returns for your key.
promptRequired for text_to_video.
max_cost_usdRequired. Positive USD amount you authorise; held when the task is created.
modeOptional. See Modes; default text_to_video.
durationSecondsOptional. Seconds within the model's range, or -1 to let the model choose.
resolutionOptional. One of the model's resolutions above; default 720p.
aspect_ratioOptional. 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, or adaptive (default).
frame_rateOptional. Default 24.
first_frame_url, last_frame_urlBase64 image data URLs for the image modes.
reference_video_urlshttps:// video links for the video modes.
reference_image_urlshttps:// image links or asset://pa_… ids for image_reference.
generate_audioOptional boolean. When omitted, the model's default (on) applies.
watermarkOptional boolean.
return_last_frameOptional boolean, default false. Makes the last frame downloadable with ?variant=last_frame.
execution_expires_afterOptional. Seconds the task may run upstream, 3600–82800.
callback_urlOptional public https:// URL that receives the task body once it is terminal.

Response shape

The create call returns 202 with a task id. Poll GET /videos/{task_id} until the task is succeeded, failed, cancelled, or expired, or receive it on your callback_url. Download with authenticated GET /videos/{task_id}/content. Use a pending state in your UI; do not block an end-user request waiting for the render to finish.