GET /v1/tasks/{task_id} to query an asynchronous task from your account.
Save the task ID and the request_id returned when you submit the job.
Status values
pendingprocessingcompletedfailedexpired
terminal is false, keep the same task ID and wait the indicated
retry_after_ms before polling again. If your client reaches its own polling
deadline, save the ID and resume later. To recover a request when you did not
receive an ID, see media timeout handling.
Completed task
The shape ofresult depends on the task type.
Image tasks return the OpenAI image format — the image URL is at result.data[0].url:
result.video_url / result.audio_url, and every output is also listed in result.urls[]:
Failed task
credits.reserved and credits.charged.
The reserved value is the original estimate. Use the charged value to check the
final task cost, and see billing for failure handling.
See webhooks to receive task notifications.