XBAI API

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
Seedance 2.0 Globalseedance-2.0-globalVideo
Seedance 2.0 Fast Globalseedance-2.0-fast-globalVideo
Seedance 2.5seedance-2.5Video
Seedance 2.5 Globalseedance-2.5-globalVideo
MiniMax H3hailuo-h3Video

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. H3 also bills input video duration and reference images beyond the first 5; see pricing. A task that reaches the failed state is refunded in full automatically.

On this page