Skip to content
中文

Callback Protocol

Asynchronous Task Callback

For asynchronous tasks such as image generation or video generation, if you provide callback_url when creating the task, the server sends an active callback whenever the task status changes.

json
{
  "task_id": "string",
  "task_status": "string",
  "task_status_msg": "string",
  "created_at": 1722769557708,
  "updated_at": 1722769557708,
  "task_result": {
    "images": [
      {
        "index": 0,
        "url": "string"
      }
    ],
    "videos": [
      {
        "id": "string",
        "url": "string",
        "duration": "string"
      }
    ]
  }
}

Field notes:

  • task_status_msg: task-status message, typically used to explain the failure reason when the task fails
  • images: result list for image tasks
  • videos: result list for video tasks
  • duration: total video duration in seconds