Sozdai LogoDocs
Endpoints/Media

Get media task

Retrieve the status and result of an async media task by its id. Poll this endpoint until status is succeeded or failed.

GEThttps://api.sozdai.ai/v1/media/generations/{id}

#Authentication

All requests carry your key in the Authorization header.

http
Authorization: Bearer sk-corr-...

#Path parameters

ParameterTypeRequiredDescription
idstringYesThe task id returned by the create-task endpoint.

#Request example

bash
curl https://api.sozdai.ai/v1/media/generations/task_abc123 \
  -H "Authorization: Bearer $CORRY_KEY"

#Response

Returns the task object. Common fields:

FieldTypeDescription
idstringGet media task id
statusstringTask status: queued / submitted / succeeded / failed / timeout.
typestringMedia type: image / video / music.
modelstringThe model you requested.
result.urlsstring[]Present on success. result.urls is an array of permanent file URLs.
errorstringError message, present when the task failed.
coststringAmount charged for this task — a USD string (e.g. "0.1200"). See the currency field.
Response examples
{
  "id": "task_abc123",
  "status": "running",
  "type": "image",
  "model": "gpt-image-2"
}

#Status values

statusDescription
queuedQueued, waiting to start.
runningGenerating on the upstream provider.
succeededDone — result.urls is available.
failedFailed — see error. The hold is automatically refunded.

succeeded

Present on success. result.urls is an array of permanent file URLs.

#Error codes

StatusMeaning
401Invalid or missing key
404The requested model does not exist or is unavailable
json
{
  "error": {
    "message": "Task not found",
    "type": "not_found"
  }
}