xbxbapi

Query a task

Read the status and result of a generation task.

GET/api/v1/jobs/recordInfo?taskId=xb_xxx

Returns the current state of a task owned by the authenticated customer.

Query parameter

FieldTypeRequiredNotes
taskIdstringYesThe identifier returned by the create endpoint

Response

Success response
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "xb_a1b2c3...",
    "model": "seedance-2.0",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://media.xbaiapi.com/video/2026/09/17/xb_a1b2c3.mp4\"]}",
    "failMsg": null,
    "creditsCharged": 165,
    "durationSeconds": 5,
    "createTime": 1789651000,
    "completeTime": 1789651045,
    "expireTime": 1792243000
  }
}

Task states

StateMeaning
waitingThe task was submitted and is queued
generatingGeneration is in progress
successGeneration completed, read resultJson.resultUrls
failGeneration failed, read failMsg; charged credits were refunded

Result expiry

expireTime is the Unix time when the result file is deleted, 30 days after createTime. It is null for tasks without a result. After that time the state stays success, but resultJson becomes null. See Result files.

Poll approximately every 5 seconds. Stop polling when the state is success or fail.

On this page