API docs · Tasks
Polling guidelines
Poll with backoff and stop at a terminal status.
Without a webhook, fetch results with the task endpoint. Generation usually takes anywhere from tens of seconds to a few minutes.
- Make the first request about 5 seconds after submitting, then increase the interval by 1.5× each time, up to 30 seconds.
- Stop polling once the status is
succeededorfailed. - Polling is free but counts toward your RPM limit. For many tasks, use the
GET /v1/videos/generationslist endpoint. - With a webhook configured, treat polling as a fallback only, e.g. check tasks with no callback received every 5 minutes.
curl https://cn-api.aitoken.tools/v1/videos/generations/task_xxx \
-H "Authorization: Bearer $AITOKEN_API_KEY"