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

StatusCodeMeaning
400invalid_requestA field is missing, unknown or out of range. message names the field and the allowed values.
401unauthorizedMissing, wrong or revoked key.
402insufficient_creditsNot enough credits. Nothing was reserved; balance shows what you have.
403access_requiredThis account cannot order yet. Sign in to the app once to finish setting up the account.
409price_changedThe price moved since your estimate. Send the new credits value returned in the error.
429rate_limitedToo many requests. 120 requests per minute per key; ordering has its own lower limit.
503service_unavailableProduction is paused or unreachable. Nothing was charged; retry in a few minutes.

All errors share one shape; see Errors.