Get a video task
Returns a task created by the authenticated account. While the status is pending or processing, poll this endpoint with backoff. A successful task includes its video URL in outputs.
/v1/tasks/{task_id}Authorization
AuthorizationBearer <token>Create a Open AI Image API key in Settings. Send it only from a trusted server.
In: header
Path Parameters
task_idstringPOST /v1/videos/generations returns this task ID.
Response Body
200
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.
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.
404
errorobjectTask not found
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.
curl "https://openaiimage.com/v1/tasks/d3a7b249c28a1e05f9210d16af47c86809a58cad92a36fc91138da677be03245" \
-H "Authorization: Bearer sk_sd_example"{
"task_id": "d3a7b249c28a1e05f9210d16af47c86809a58cad92a36fc91138da677be03245",
"status": "processing",
"credits_used": 5,
"outputs": []
}