API docs · Getting started
Quickstart
Integrate in four steps and submit your first video task.
aitoken.tools gives you Seedance video generation through a single platform API key. The API is asynchronous: submitting a task returns a task ID right away, and you fetch the result by polling or via a webhook once generation finishes. Getting started takes four steps:
- Create an account and verify your email address.
- Contact our operations team to top up your quota: after you pay offline, they match the payment reference and credit the quota to your account.
- Create a key under Console · API keys, grant the
tasks:createandtasks:readscopes, and select the models you plan to use. - Submit a task with
POST /v1/videos/generations, then fetch the result withGET /v1/videos/generations/{id}.
Base URL
The API base URL for this site (China site) is https://cn-api.aitoken.tools/v1, and prices are in CNY. Accounts, keys and quota are separate between the China site and the Global site: a key only works on the site that issued it.
Your first task
The sample on the right submits a 5-second 720p text-to-video task. The API responds with 202 Accepted and a task object whose status is queued. billing.reserved_amount is the upper bound reserved for this task; when the task ends you are charged for actual usage and the difference is released.
Idempotency-Key header. If a request times out, retry it with the same key: no duplicate task is created and you are never charged twice. See Idempotency.Next steps
- To use a first frame, reference images or reference videos, upload assets first.
- In production, use webhooks and keep polling as a fallback.
- Read up on error codes and retry guidelines.
curl https://cn-api.aitoken.tools/v1/videos/generations \
-H "Authorization: Bearer $AITOKEN_API_KEY" \
-H "Idempotency-Key: order-A1001-v1" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0-standard",
"prompt": "Slow push-in on a mountain town in morning mist",
"duration": 5,
"resolution": "720p",
"ratio": "16:9"
}'