Async delivery

Reliable video jobs with status and webhooks

Choose polling for simple clients or webhooks for hands-off delivery. Both use the same task lifecycle.

Create a task with a webhook
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" }]
}

One lifecycle, two delivery patterns

Store every task ID and treat succeeded and failed as the only terminal states.

Predictable polling

Create a task, then poll the check-result endpoint to keep status and progress in sync without SSE.

20 concurrent requests

Process up to 20 video generation tasks simultaneously. Contact us for higher limits.

Transparent billing

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.

Recommended integration flow

Webhook delivery rules

Return a 2xx response quickly, process events idempotently, and keep polling available as a recovery path.

Create the task

Send the Tikdek API request with your prompt, then store the returned taskId.

Track progress

Call the check-result endpoint until the status becomes succeeded or failed.

Deliver the video

Use the storage-backed URLs in result_url/result_urls to serve or download the generated video.

Frequently asked questions

How do I authenticate my requests?

Create an API key in the console, then include it as Authorization: Bearer YOUR_API_KEY. Keys can be rotated at any time.

How should I poll for results?

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.

How are credits handled for failures?

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.

Ship resilient async generation

Begin with polling, then add webhook processing without changing the generation contract.