Developers · v1

Cook Studio API

Order full YouTube-ready videos and generate clips, images, voiceovers and music from your own code. Every model in the app is available, at the same prices, paid from your Cook Studio credits.

Get your API key

Authentication

Create a key in the app under Developers. It starts with cs_live_ and is shown once. Send it on every request:

curl https://app.cookstudio.ai/api/v1/me \
  -H "Authorization: Bearer $KEY"   # KEY = your cs_live_ key

Keep the key on your server. Do not put it in a browser, a mobile app or a public repository: the API sends no CORS headers on purpose. If a key leaks, generate a new one in the app; the old one stops working immediately.

Credits and pricing

Prices are the same as in the app and can move with provider costs, so they are never hard-coded: always call an/estimate endpoint first, show or check the number, then send it back as credits when you order. If the price changed in between you get 409 price_changed with the new value and nothing is charged. Credits are reserved when you order, settled when the job finishes and refunded automatically if it fails.

Endpoints

Base URL: https://app.cookstudio.ai/api/v1. JSON in, JSON out.

GET/meYour account and credit balance.
GET/modelsVideo engines and generation models, with the allowed seconds / count for each.
POST/videos/estimateCredit price of a video order. Nothing is charged.
POST/videosOrder a video. Credits are reserved now, settled when it finishes, refunded if it fails.
GET/videosYour videos, newest first (?limit=1-50).
GET/videos/{id}Status of one video. While it waits at a stop, `pending` holds the script or storyboard.
POST/videos/{id}/decisionApprove, cancel or revise a video waiting at a stop.
GET/videos/{id}/downloadA 15-minute signed download link for a finished video (?inline=1 to stream).
POST/generations/estimateCredit price of a single-model generation. Nothing is charged.
POST/generationsGenerate a clip, image, voiceover or music track with one model.
GET/generationsYour latest generations.
GET/generations/{id}Status of one generation.
GET/generations/{id}/fileThe output file (mp4, png/jpg or mp3) once it is done (?inline=1 to stream).

Videos

A full video (script, voiceover, visuals, edit) from a topic or your own script. A one-minute video usually takes 10-20 minutes.

# 1. price
curl https://app.cookstudio.ai/api/v1/videos/estimate -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"topic": "Why the Mary Celeste was found empty", "duration_min": 3, "language": "en"}'
# → {"credits": 120, "enough_credits": true, ...}

# 2. order (same fields + credits)
curl https://app.cookstudio.ai/api/v1/videos -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-2026-11-23-001" \
  -d '{"topic": "Why the Mary Celeste was found empty", "duration_min": 3, "language": "en", "credits": 120}'
# → 201 {"id": "6f1c…", "status": "queued", ...}

# 3. poll every minute or so, then download
curl https://app.cookstudio.ai/api/v1/videos/6f1c… -H "Authorization: Bearer $KEY"
curl https://app.cookstudio.ai/api/v1/videos/6f1c…/download -H "Authorization: Bearer $KEY"
# → {"url": "https://…", "expires_at": "…"}

topic string, 10+ chars, required. What the video is about; tone requests welcome.

duration_min integer minutes. Required unless `script` is given (then it is derived from the script).

script Your own narration text, read word for word.

engine michelin (default) · lite · heytuber

avatar Required for heytuber: an avatar id (av-xxxxxx) created in the app.

language tr · en · es · de · fr · pt · ar · ru. Defaults to the topic's language.

aspect_ratio 16:9 (default) · 9:16

sources Visual sources: stock · ai · animation · web

music · sfx · subtitles · brand_outro booleans. Music changes the price; sfx needs music; brand_outro gives a discount.

reference_url A YouTube video whose style to follow.

source_urls Up to 3 article links the script should be based on.

channel A channel profile slug from your account.

stops Pause for your approval at: script · storyboard · voiceover · render (michelin only).

credits The value from /videos/estimate. If it no longer matches, you get 409 price_changed and nothing is charged.

Status values: queued · running · awaiting_approval · done · failed · cancelled · abandoned. Send an Idempotency-Key header (8-100 chars) so a retried request never creates a second order.

Approval stops. With stops, the video pauses with status awaiting_approval and the stop's content in pending. Answer with POST /videos/{id}/decision {"stop": "script", "decision": "approve"}. cancel closes the job and refunds the unused part.revise (script and storyboard only, with a note) reruns that step for a fee of 20% / 45% of the job's credits, at most twice per stop.

Generations

One model, one output. Get model ids and allowed values from GET /models.

curl https://app.cookstudio.ai/api/v1/generations -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"model": "gpt-image-25", "prompt": "A red fox in fresh snow, golden hour", "aspect_ratio": "16:9"}'
# → 201 {"id": "a91e…", "status": "running", "credits": 3, ...}

curl https://app.cookstudio.ai/api/v1/generations/a91e… -H "Authorization: Bearer $KEY"     # → "status": "done"
curl -o fox.png https://app.cookstudio.ai/api/v1/generations/a91e…/file -H "Authorization: Bearer $KEY"

video (veo-31, omni-11): 8-second clips; a start frame is required as "image": {"mime_type": "image/jpeg", "base64": "…"} (raw base64, about 150 KB max).

image (gpt-image-25, nano-banana-pro): one image per request (count 1).

speech (elevenlabs-v4): the prompt is the text to read; priced by characters.

music (elevenlabs-music): seconds 30, 60, 120 or 180.

Without credits the current price is accepted automatically; send the value from /generations/estimate to lock it. A failed generation (status: failed) is refunded in full; error_type tells you whether it was the provider, the input or us.

Errors

{"error": {"code": "price_changed", "message": "The price changed since your estimate…", "credits": 5}}
400invalid_requestA field is missing, unknown or out of range. The message names it.
401unauthorizedMissing, wrong or revoked key.
402insufficient_creditsTop up and try again. Nothing was reserved.
404not_foundNo such video/generation on this account.
409price_changed · conflict · not_readyRe-estimate, or wait until the job is done.
413payload_too_largeBody over 300 KB (shrink the start frame).
429rate_limited120 requests/min per key; ordering has its own lower limit.
503service_unavailable · model_unavailableProduction is paused or the model is down. Nothing was charged.

Every response carries an x-request-id; quote it when you contact support. Some errors also include a detail field with extra context for our support team.

Security and limits

Keys are stored only as a SHA-256 hash, so we cannot show a key again. Every request is checked against the key and the account; revoking a key takes effect on the next request. Orders are prepaid from credits, so a leaked key can never spend more than your balance. Requests are logged (method, path, status, time; never bodies or keys) to detect abuse. Limits: 120 requests/min per key, 10 orders/min per account, request body up to 300 KB.

Usage must follow the Terms of Service: no content that impersonates real people without consent, infringes copyright or breaks the law. Accounts that abuse the API are closed.