API reference
Estimate a video
Credit price of a video order with these settings. Nothing is charged. Accepts every video field except stops and credits.
POST https://app.cookstudio.ai/api/v1/videos/estimate
Body
The video fields.
Request
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"}'Response
{"object": "estimate", "credits": 150, "duration_min": 3, "max_duration_min": 30, "balance": 1240, "enough_credits": true}queued: true appears when production is busy: the order is accepted and starts as soon as a slot frees up.
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. |
| 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.