Query a task
Read the status and result of a generation task.
GET
/api/v1/jobs/recordInfo?taskId=xb_xxxReturns the current state of a task owned by the authenticated customer.
Query parameter
| Field | Type | Required | Notes |
|---|---|---|---|
taskId | string | Yes | The identifier returned by the create endpoint |
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
| State | Meaning |
|---|---|
waiting | The task was submitted and is queued |
generating | Generation is in progress |
success | Generation completed, read resultJson.resultUrls |
fail | Generation 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.