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
1 credit = $0.005. Public per-model pricing, charged by usage.
seedance-2.0
ByteDance video generation. Text-to-video and first/last-frame image-to-video, 4–15 seconds.
720p text-to-video
33credits/sec
≈ $0.825 for a 5-second clip
seedance-2.0-fast
The faster variant with the same request shape.
720p text-to-video
33credits/sec
≈ $0.825 for a 5-second clip
Image, video and other generation models are being added. They use the same API, so your integration does not change.
Video models are open at 720p today. 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['XBAPI_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.XBAPI_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 that cost you time when a model provider misbehaves.
Tasks, queries and callbacks work the same for every model. New models are usable as soon as they launch.
Per-model prices are public, and you are charged for what you use. 1 credit = $0.005.
Every result is copied to our own object storage and stays available for 30 days, well after temporary upstream links expire.
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 recovers dropped upstream callbacks.
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 public unit price, and you pay for what you use. 1 credit = $0.005. The amount is held when you submit and settled when the task ends.
720p today. Higher tiers open once their upstream cost is confirmed — we would rather not sell a tier we cannot cost.
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.