Create a video task
Starts a Seedance video task and returns its ID. Use GET /v1/tasks/{task_id} to check the status. Reuse request_id when retrying to avoid creating a second task.
/v1/videos/generationsAuthorization
AuthorizationBearer <token>Create a Open AI Image API key in Settings. Send it only from a trusted server.
In: header
Request Body
modelstringA public video model ID.
"seedance_2_5" | "seedance_2_0" | "seedance_2_0_fast" | "seedance_2_0_mini"promptstringDescribe the video you want to create.
1 <= length <= 10000parameters?objectVideo generation parameters. Omitted parameters use the model defaults.
Properties
duration?integerThe video length in seconds. Supported values depend on the model.
1 <= value <= 30resolution?stringThe output resolution. Available options depend on the model.
"480p" | "720p" | "1080p"aspect_ratio?stringThe output aspect ratio. Only supported models accept adaptive.
"16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive"generate_audio?booleanSet to true to generate synchronized audio when the model supports it.
reference_urls?array<string>Upload files to this account’s asset library first, then use their /api/studio/media/ paths. Types and counts depend on the model. Download private outputs using the same Authorization header.
Array Item
stringA private media path owned by this account.
max_creditsintegerMaximum credits authorized for this request. A higher quote is rejected before charging.
1–10000request_id?stringA UUID for this request. Reuse it when retrying to avoid creating a second task or charge.
format: uuidResponse Body
202
task_idstringThe task identifier.
statusstringThe current task status.
"pending" | "processing" | "success" | "failed" | "canceled"credits_usednumberThe task’s credit cost. Credits are returned if generation fails.
outputsarray<object>Output media for a successful task.
Array Item
urlstringThe output media URL.
thumbnail?stringThe thumbnail URL, when available.
error?stringThe error message when generation fails.
400
errorobjectChoose an available video model
Properties
messagestringThe error message.
codenumberThe HTTP status code.
401
errorobjectA valid API key is required
Properties
messagestringThe error message.
codenumberThe HTTP status code.
403
errorobjectProduct API is disabled
Properties
messagestringThe error message.
codenumberThe HTTP status code.
413
errorobjectRequest is too large
Properties
messagestringThe error message.
codenumberThe HTTP status code.
429
errorobjectToo many requests
Properties
messagestringThe error message.
codenumberThe HTTP status code.
500
errorobjectUnable to complete the request
Properties
messagestringThe error message.
codenumberThe HTTP status code.
503
errorobjectThis model is not configured yet. Please try another model.
Properties
messagestringThe error message.
codenumberThe HTTP status code.
curl -X POST "https://openaiimage.com/v1/videos/generations" \
-H "Authorization: Bearer sk_sd_example" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance_2_0_fast",
"prompt": "A paper boat crossing a rain-soaked neon street, cinematic camera movement",
"parameters": {
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true
},
"request_id": "72c1ca71-5e68-4a76-9c3b-bbc036261e30",
"max_credits": 65
}'{
"task_id": "d3a7b249c28a1e05f9210d16af47c86809a58cad92a36fc91138da677be03245",
"status": "processing",
"credits_used": 5,
"outputs": []
}