01
One interface
Every model shares the same task API. Switching models means changing the model field.
- Same endpoint
- Same request shape
- Same response envelope
- Same callbacks
One API · more models on the way
A single task-based API: submit a task, poll its status or receive a callback. Outputs are kept for 30 days, failed tasks are refunded automatically, and new models plug into the same interface.
Balance (credits)
12,480
Spent in 7 days
15,510
Tasks
95
Success rate
98.9%
Credits spent per day
Recent tasks
1 key
for every model we host
100%
of credits returned on failure
2 min
between callback recovery sweeps
30 days
result file retention
Why it holds up
Access, billing and delivery are handled at the gateway, so your code only deals with the output.
01
Every model shares the same task API. Switching models means changing the model field.
02
Credits are held on submit and settled when the task ends. Every movement is in your ledger.
03
From submission to delivery, the gateway owns the parts that usually break.
Models
Every model is called through the same task API.
seedance-2.0
ByteDance video generation. Text-to-video and first/last-frame image-to-video, 4–15 seconds.
seedance-2.0-fast
The faster variant with the same request shape.
seedance-2.0-global
Seedance 2.0 through the global route, with the same request shape.
seedance-2.0-fast-global
Seedance 2.0 Fast through the global route, with the same request shape.
seedance-2.5
Seedance 2.5 through the domestic route. Text, first/last frames or multimodal references, 4 to 30 seconds, audio-only references and up to 30 reference images.
seedance-2.5-global
Seedance 2.5 through the global route. Text-to-video, first/last frames, or multimodal references, 4 to 30 seconds, up to 30 reference images.
hailuo-h3
MiniMax H3 with first/last frames and multimodal references, 768p or 2K output, and 5 to 15 seconds of video.
Image, video and other generation models are being added. They use the same API, so your integration does not change.
Video models support 480p and 720p. Failed tasks are refunded in full.
Quickstart
Every model shares one API. Switching models means changing one field.
Put the model ID in the model field. The rest of the request stays the same.
curl -X POST https://api.xbaiapi.com/api/v1/jobs/createTask \
-H "Authorization: Bearer xb-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0",
"input": {
"prompt": "a cat stretching on a sunlit windowsill",
"duration": 5
}
}'import os
import requests
resp = requests.post(
"https://api.xbaiapi.com/api/v1/jobs/createTask",
headers={"Authorization": f"Bearer {os.environ['XBAIAPI_KEY']}"},
json={
"model": "seedance-2.0",
"input": {
"prompt": "a cat stretching on a sunlit windowsill",
"duration": 5,
},
},
)
print(resp.json()["data"]["taskId"])const res = await fetch(
"https://api.xbaiapi.com/api/v1/jobs/createTask",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.XBAIAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "seedance-2.0",
input: {
prompt: "a cat stretching on a sunlit windowsill",
duration: 5,
},
}),
},
);
const { data } = await res.json();
console.log(data.taskId);Details
The parts of video generation that usually cost you time.
Tasks, queries and callbacks work the same for every model. New models are usable as soon as they launch.
Per-model prices are listed in the docs, and you are charged for what you use.
Every result is stored in our own object storage, and its link stays valid for 30 days.
Credits are held on submit and returned in full the moment a task fails.
If your endpoint is down we retry, and a sweep every two minutes resends callbacks that did not get through.
Keys, tasks, usage and billing in one place, with a per-task record of what was charged.
FAQ
See Available models above. More models are being added, and each one uses the same API as the rest.
Each model has a unit price listed in the docs, and you pay for what you use. The amount is held when you submit and settled when the task ends.
480p and 720p are supported. The default is 720p.
The full credit amount is returned automatically. You can see the refund in your transaction history.
30 days from task creation, then the file is deleted. Copy anything you need to keep to your own storage before then.
No. Callbacks are optional; without one you can poll the query endpoint with the task ID. If you do set one, failed deliveries are retried.
Get started
Sign in, create a key, submit your first task.