xbxbapi

Create a task

Submit a generation task for any model.

POST/api/v1/jobs/createTask

Creates an asynchronous generation task. Every model uses this endpoint. Credits are charged when the request is accepted.

Request body

Request
{
  "model": "seedance-2.0",
  "input": {
    "prompt": "a cat stretching on a sunlit windowsill"
  },
  "callBackUrl": "https://your-server.com/webhook"
}

Common fields

FieldTypeRequiredNotes
modelstringYesModel identifier, see the table below
inputobjectYesModel-specific parameters, documented on each model page
callBackUrlstringNoOmit it and poll the query endpoint instead

Models

Modelmodel valueType
Seedance 2.0seedance-2.0Video
Seedance 2.0 Fastseedance-2.0-fastVideo

Response

Success response
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "xb_a1b2c3d4e5f6...",
    "creditsCharged": 165
  }
}

Store taskId immediately. Use it to query status and deduplicate callbacks.

Billing behavior

Credits are charged when the task is submitted. The amount is calculated from output duration and the model rate. A task that reaches the failed state is refunded in full automatically.

On this page