API reference
Create a video
Order a full video: script, voiceover, visuals and edit. Credits are reserved now, settled when it finishes and refunded automatically if it fails. A one-minute video usually takes 10-20 minutes.
POST https://app.cookstudio.ai/api/v1/videos
Body
The video fields.
Request
curl https://app.cookstudio.ai/api/v1/videos -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: order-2026-12-04-001" \
-d '{"topic": "Why the Mary Celeste was found empty", "duration_min": 3, "language": "en", "credits": 150}'Response
{"id": "6f1c…", "object": "video", "topic": "Why the Mary Celeste was found empty", "engine": "michelin", "status": "queued", "stage": null,
"error": null, "duration_min": 3, "aspect_ratio": "16:9", "credits": 150, "test_mode": false, "stops": [], "waiting_stop": null,
"created_at": "2026-12-04T10:00:00Z", "finished_at": null}Send an Idempotency-Key header (8-100 characters of A-Z a-z 0-9 _ : -). A retried request with the same key returns the first order instead of creating a second one.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | A field is missing, unknown or out of range. message names the field and the allowed values. |
| 401 | unauthorized | Missing, wrong or revoked key. |
| 402 | insufficient_credits | Not enough credits. Nothing was reserved; balance shows what you have. |
| 403 | access_required | This account cannot order yet. Sign in to the app once to finish setting up the account. |
| 409 | price_changed | The price moved since your estimate. Send the new credits value returned in the error. |
| 429 | rate_limited | Too many requests. 120 requests per minute per key; ordering has its own lower limit. |
| 503 | service_unavailable | Production is paused or unreachable. Nothing was charged; retry in a few minutes. |
All errors share one shape; see Errors.