Create video generation
Source-generated POST /video-generations reference: authentication, fields, responses, errors, and operational safeguards.
On this page
Operation
POST /video-generations
operationId: create_video_generation_v1_video_generations_post
Start a paid asynchronous task. Quote first and obtain user approval. Persist the returned ID; 202 means accepted, not complete. Reuse the same Idempotency-Key, credential identity, and unchanged request after an uncertain response. Creation recalculates price; Public API quotes do not lock it and max_credits/quote_id are not API request fields. Poll using Retry-After and inspect outputs at every terminal state, including failure.
Authentication and side effects
Use a server-side Bearer API key. Required scope: animations:write
This creates paid work. Obtain approval before submission. API quotes do not lock a price or enforce a maximum budget.
Parameters
| Parameter | Location | Type | Required | Constraints / default | Meaning |
|---|---|---|---|---|---|
Idempotency-Key |
header |
string |
Yes | minLength: 8; maxLength: 200 |
Persist once per logical operation; reuse with the same credential and unchanged body. Changing credentials changes the deduplication scope. |
Request body (application/json)
Body required: true
| Field | Type | Required | Default | Constraints | Meaning |
|---|---|---|---|---|---|
input |
GenerationInput | Yes | — | — | Images owned by the caller or supplied for this generation. |
metadata |
object |
No | {} |
— | Caller metadata: simple string/number/boolean/null values, at most 4 KiB JSON. Do not store secrets. |
negative_prompt |
string |
No | "" |
maxLength: 4000 |
Optional exclusions, only when the model supports negative prompts. |
prompt |
string |
No | "" |
maxLength: 8000 |
Motion instruction; nonempty when the model requires a prompt. Keep private prompts out of logs. |
video |
VideoOptions | No | {"duration_seconds":null,"input_canvas":null,"model":null,"ratio":null,"resolution":null,"seed":null,"style_preset":null,"transparency":{"key_color":null,"key_selection":"auto","mode":"standard"},"watermark":null} |
— | Model-compatible generation settings. |
Full nested schema: VideoGenerationCreateRequest
Request example
{
"input": {
"first_frame": {
"file_id": "00000000-0000-4000-8000-000000000001",
"type": "file"
}
},
"prompt": "A character runs in place, side view, fixed camera."
}
Responses
| HTTP | Body | Meaning |
|---|---|---|
202 |
TaskResponse | Accepted asynchronously; poll the task ID. |
400 |
APIErrorEnvelope | Invalid input; correct the request before retrying. |
401 |
APIErrorEnvelope | Missing, expired, or revoked API key. |
402 |
APIErrorEnvelope | Insufficient credits; do not automatically purchase. |
403 |
APIErrorEnvelope | Account eligibility, account status, or key scope does not allow this operation. |
404 |
APIErrorEnvelope | Resource is unavailable, not owned, or its signature is invalid/expired. |
409 |
APIErrorEnvelope | Idempotency conflict; only IDEMPOTENCY_IN_PROGRESS is retryable with the original request. |
413 |
APIErrorEnvelope | Request or decoded image exceeds the configured limit. |
415 |
APIErrorEnvelope | Use supported image media types. |
422 |
APIErrorEnvelope | Decoded image dimensions exceed the allowed size. |
429 |
APIErrorEnvelope | Account-wide rate or queue limit; wait for Retry-After. |
500 |
APIErrorEnvelope | Internal failure; preserve the task/key and retry only when marked retryable. |
503 |
APIErrorEnvelope | Service/provider unavailable; retry only when error.retryable is true. |
Response headers
| HTTP | Header | Type | Meaning |
|---|---|---|---|
202 |
Retry-After |
integer |
Suggested wait in seconds; respect the server value and an overall deadline. |
429 |
Retry-After |
integer |
Suggested wait in seconds; respect the server value and an overall deadline. |
503 |
Retry-After |
integer |
Suggested wait in seconds; respect the server value and an overall deadline. |
Response example
{
"created_at": "2026-08-30T00:00:00Z",
"credits": {
"charged": 0,
"held": 1,
"quoted": 1
},
"error": null,
"finished_at": null,
"id": "00000000-0000-4000-8000-000000000002",
"metadata": {},
"normalized_input": {},
"object": "video_generation",
"outputs": [],
"progress": 0,
"stage": "queued",
"started_at": null,
"status": "queued"
}
Related guides
Was this page helpful?
No search queries, code, or free text are collected. This switch controls documentation interactions only; general site analytics follow the privacy policy. Privacy policy