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.

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 id | durationSeconds | resolution | Default duration | Reference videos per request | Reference images per request |
|---|---|---|---|---|---|
bytedance/seedance-2.0 | 4–15 | 480p, 720p, 1080p, 4k | 5 | up to 3 | — |
bytedance/seedance-2.0-fast | 4–15 | 480p, 720p | 5 | up to 3 | up to 9 |
bytedance/seedance-2.0-mini | 4–15 | 480p, 720p | 5 | up to 3 | up to 9 |
bytedance/seedance-2.5 | 4–30 | 480p, 720p, 1080p | -1 (the model chooses) | up to 10 | up to 30 |
- 4K is served on
bytedance/seedance-2.0only. A4krequest on any other Seedance model is refused with400. durationSeconds: -1lets the model choose the length within its range, on every Seedance model.- On Seedance, when omitted,
resolutionis720p,aspect_ratioisadaptive, andframe_rateis24. - Send the id
/modelslists (for examplebytedance/seedance-2.0-fast). The id without thebytedance/prefix is also accepted.
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.
| Line | Where the video is generated | Notes |
|---|---|---|
bytedance/seedance (default) | ByteDance Ark, mainland China | |
bytedance-oversea/seedance | ByteDance 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 id | durationSeconds | resolution | aspect_ratio | Defaults | Other fields |
|---|---|---|---|---|---|
alibaba/wan3.0-video | 2–30 | 480p, 720p, 1080p | adaptive, 16:9, 9:16, 1:1, 4:3, 3:4, 21:9 | 5 s, 1080p, adaptive | generate_audio (when omitted, the model's default applies) |
kuaishou/kling-4.0 | 3–30 | 720p, 1080p | 16:9, 9:16, 1:1, 21:9 | 5 s, 720p, 16:9 | — |
kuaishou/kling-4.0-flash | 3–20 | 720p | 16:9, 9:16, 1:1, 21:9 | 5 s, 720p, 16:9 | — |
- Both serve
text_to_videoand, with a Base64 data URLfirst_frame_url,image_to_video(omitmodeor send it). Any othermodeis refused with400. Onkuaishou/kling-4.0the ratio then comes from the image, soaspect_ratiois refused beside a frame;alibaba/wan3.0-videostill takesaspect_ratio(defaultadaptive) beside a frame. - A last frame, reference videos, reference images,
quality,frame_rate,watermark: true,return_last_frame,callback_url, andexecution_expires_afterare refused with400on both, as isgenerate_audioonkuaishou/kling-4.0.watermark: false,frame_rate: 0, and an emptyquality,last_frame_url, orcallback_urlcount as omitted. kuaishou/kling-4.0-flashtakes the same request askuaishou/kling-4.0within its own limits above; see Kling 4.0 Flash.kuaishou/kling-3.0-motion-controldrives one character image (reference_image_urls) with one motion video (reference_video_urls), withcharacter_orientationand nodurationSeconds; see Kling 3.0 Motion Control.- Each is listed by
/modelsonly for a key with access to its own video line. The id without thealibaba/orkuaishou/prefix is also accepted.
MiniMax H3
| Model id | durationSeconds | resolution | aspect_ratio | Defaults | Modes |
|---|---|---|---|---|---|
minimax/h3 | 4–15 | 768p, 2k | text_to_video: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16; image_reference: those or adaptive; ignored with a frame | 5 s, 768p, 16:9 (adaptive on image_reference) | text_to_video, image_to_video, first_last_frame, image_reference (up to 9 images) |
- Frames and reference images are public
https://links onminimax/h3; a Base64 data URL and anasset://id are refused with400.video_referenceis not served. generate_audio: false,return_last_frame: true,execution_expires_after, aframe_rateother than 24, andqualityare refused with400.minimax/h3is listed by/modelsonly for a key with access to the MiniMax H3 video line. It has no unprefixed spelling.minimax/h3is charged per second of video at the output resolution, input plus output seconds, every mode at the same rate: $0.13 at2k, $0.08 at768p. The first 5 input images per task are free; each further one is $0.04. See MiniMax H3 prices.
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.
mode | Inputs |
|---|---|
text_to_video (default) | prompt (required). No frames, no reference videos. |
image_to_video | first_frame_url, and no last_frame_url. |
first_last_frame | Both first_frame_url and last_frame_url. |
video_reference | reference_video_urls, no frames. |
video_edit | reference_video_urls, no frames. On bytedance/seedance-2.5, aspect_ratio must be adaptive and durationSeconds must be -1. |
video_extend | Exactly one reference_video_urls entry, no frames, aspect_ratio adaptive. |
image_reference | reference_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. |
- Frames (
first_frame_url,last_frame_url) are Base64 data URLs:data:image/<format>;base64,<data>. Anhttps://image link is refused with400, except onminimax/h3, which takes onlyhttps://links. The whole request body is limited to 11 MB. - Reference videos (
reference_video_urls) are publichttps://links without credentials, each at most 4096 bytes. Quotaflow passes them to the model without downloading them, so keep them reachable while the task runs. - Reference images (
reference_image_urls) are publichttps://image links on the same terms as reference videos, orasset://pa_…ids of portraits your organization registered (see Real-person references). - A mode other than
text_to_videois only served by capacity that has passed that mode's check; it is never sent to capacity verified for text-to-video only. - Exact model family: Seedance ids are never used as a fallback for a
veo-*request, and Seedance, Wan, Kling, and MiniMax H3 never stand in for one another.
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 gets404from the endpoints below and400for anasset://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
?format=jsonreturns{ "url": ..., "expires_at": ... }instead of redirecting.?variant=last_framedoes the same for the video's last frame (a JPEG), which exists when the task was created withreturn_last_frame: true; a task without one answers404 LAST_FRAME_UNAVAILABLEand polls withlast_frame_available: false.- A task that is still pending answers
409; a failed, cancelled, or expired task answers410. After the video link expires, the endpoint answers410 VIDEO_CONTENT_EXPIRED.
Parameters
Unknown fields are refused with 400; send only the fields below.
| Field | Notes |
|---|---|
model | Required. One of the ids above that /models returns for your key. |
prompt | Required for text_to_video. |
max_cost_usd | Required. Positive USD amount you authorise; held when the task is created. |
mode | Optional. See Modes; default text_to_video. |
durationSeconds | Optional. Seconds within the model's range, or -1 to let the model choose. |
resolution | Optional. One of the model's resolutions above; default 720p. |
aspect_ratio | Optional. 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, or adaptive (default). |
frame_rate | Optional. Default 24. |
first_frame_url, last_frame_url | Base64 image data URLs for the image modes. |
reference_video_urls | https:// video links for the video modes. |
reference_image_urls | https:// image links or asset://pa_… ids for image_reference. |
generate_audio | Optional boolean. When omitted, the model's default (on) applies. |
watermark | Optional boolean. |
return_last_frame | Optional boolean, default false. Makes the last frame downloadable with ?variant=last_frame. |
execution_expires_after | Optional. Seconds the task may run upstream, 3600–82800. |
callback_url | Optional 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.