xbxbapi

Completion callback

Receive a webhook when a task reaches a terminal state.

When callBackUrl is present in the create request, xbapi sends one POST request after the task reaches success or fail.

Payload

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "xb_a1b2c3...",
    "model": "seedance-2.0",
    "state": "success",
    "resultUrl": "https://media.xbaiapi.com/video/2026/09/17/xb_a1b2c3.mp4",
    "failMsg": null,
    "creditsCharged": 165,
    "completeTime": 1789651045,
    "expireTime": 1792243000
  }
}

Delivery rules

RuleBehavior
TimingSent only for terminal states, never for progress updates
SuccessAny HTTP 2xx response acknowledges delivery
RetryNetwork failures and non-2xx responses are retried, 4 attempts total
DuplicatesRare duplicates are possible, deduplicate by taskId

expireTime is when the result file is deleted, 30 days after task creation. It is null for failed tasks. Download the file before then.

Return a 2xx response quickly and move slow processing to your own queue.

On this page