xbxbapi

Getting Started

Everything you need to send your first xbapi request and receive a generated video.

xbapi gives you AI generation models through one task-based API. Requests use a stable response envelope, asynchronous task processing, and automatic refunds when generation fails.

Base URL

https://api.xbaiapi.com

The domain is currently a placeholder. Replace it with the production domain before launch.

Request flow

  1. Create an API key in the console.
  2. Submit a generation request with POST /api/v1/jobs/createTask.
  3. Store the returned taskId.
  4. Poll GET /api/v1/jobs/recordInfo, or provide callBackUrl and wait for the callback.
  5. Read the final URL from the successful task response.

First request

cURL
curl -X POST https://api.xbaiapi.com/api/v1/jobs/createTask \
  -H "Authorization: Bearer xb-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.0",
    "input": {
      "prompt": "a cat stretching on a sunlit windowsill",
      "resolution": "720p",
      "duration": 5,
      "ratio": "16:9",
      "generateAudio": true,
      "imageUrls": []
    }
  }'

Response envelope

Every endpoint returns the same top-level structure.

{
  "code": 200,
  "msg": "success",
  "data": {}
}

An HTTP 200 response from the create endpoint means the task was accepted. It does not mean generation has completed.

Available models

ModelUse caseStatus
seedance-2.0Standard video generationAvailable
seedance-2.0-fastFaster video generationAvailable

Each model page lists its parameters, examples, and rate.

Next steps

Start with Authentication, then open the page for the model you want, for example Seedance 2.0, and Query a task.

On this page