---
agent:
  instructions: "Use this search API to find relevant Cook Studio content (product, pricing, FAQ, blog articles, example videos) with keywords or natural-language queries instead of crawling pages. Results are returned in Markdown."
  endpoint: "https://cookstudio.ai/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
title: "Create a video"
description: "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."
---
# 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](https://cookstudio.ai/docs/videos#fields).

## Request

```bash
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

```json
{"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](https://cookstudio.ai/docs/errors).

Canonical: https://cookstudio.ai/docs/reference/create-video
