Predictable polling
Create a task, then poll the check-result endpoint to keep status and progress in sync without SSE.
Choose polling for simple clients or webhooks for hands-off delivery. Both use the same task lifecycle.
curl -X POST https://sora2-api.com/api/v1/video/sora-video \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "A tracking shot through a quiet night market",
"aspectRatio": "16:9",
"webHook": "https://api.example.com/webhooks/video",
"isPublic": false
}'
# Your webhook receives a terminal payload:
{
"id": "task_123",
"status": "succeeded",
"progress": 100,
"results": [{ "url": "https://storage.example/video.mp4" }]
}Store every task ID and treat succeeded and failed as the only terminal states.
Create a task, then poll the check-result endpoint to keep status and progress in sync without SSE.
Process up to 20 video generation tasks simultaneously. Contact us for higher limits.
Each call costs 100 credits for 10s sora-2/sora-2-stable, 150 credits for 15s sora-2/sora-2-stable, or 150 credits for sora-2-pro, with automatic refunds when a generation fails.
Webhook delivery rules
Return a 2xx response quickly, process events idempotently, and keep polling available as a recovery path.
Send the Tikdek API request with your prompt, then store the returned taskId.
Call the check-result endpoint until the status becomes succeeded or failed.
Use the storage-backed URLs in result_url/result_urls to serve or download the generated video.
Create an API key in the console, then include it as Authorization: Bearer YOUR_API_KEY. Keys can be rotated at any time.
After calling create, store the taskId. Call /api/video-generations/check-result every 3-5 seconds until status is succeeded or failed, then use result_url/result_urls.
We automatically refund credits when a task fails and return refund_trans_no plus credits_refunded=true in the check-result payload for audit trails.
Begin with polling, then add webhook processing without changing the generation contract.