Create a job
202:
Request fields
Poll the job
status is final:
A finished job:
When the model refuses a prompt
The model can refuse a prompt, for example when it detects copyrighted audio or other restricted content. The job ends with statusfailed, billing_status refunded and an error.code such as upstream_generation_failed. You are not charged. Change the prompt and create a new job with a new Idempotency-Key. Reusing the old key returns the same failed job.
Retry safely with Idempotency-Key
Send anIdempotency-Key header with every create request, for example your own order ID. If the connection drops or you are not sure the job was created, send the same request with the same key. You get the same job back and are not charged again.
Use a new key only for a new video. Reusing a key with a different body returns 409 idempotency_conflict. Keys are up to 256 characters, without leading or trailing spaces. A key works across both create endpoints: a job started with POST /v1/videos/generations can be picked up with POST /v1/async/videos and the same key.
Wait in one call
POST /v1/videos/generations takes the same body and headers, waits for the video and returns:
504 with the job ID:
GET /v1/async/videos/{task_id}, or repeat the call with the same Idempotency-Key. Do not send it without the key, or you start a second paid video. Set your client timeout to at least 620 seconds. For production, the async flow is still the better choice: no long open connections, and you control the polling.
Price and billing
The price is per second of video, by model and resolution. See Models and pricing.- The full price, per-second rate times
duration, is held from your balance when the job is created. - If the job fails, the hold is returned in full.
billing_statusshowsheld, thensettledorrefunded. - Example: Seedance 2.5, 720p, 5 seconds costs 5 × $0.305 = $1.525.
Video errors
Video errors use this shape:{"error": {"code", "message", "task_id"}}.