Generations
Generations
One model, one output. Use it for a single clip, image, voiceover or track; use Videos for a finished, edited video.
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"By type
| Type | Measure | Models |
|---|---|---|
| Video clip | seconds + required start frame image | 7 |
| Image | count | 17 |
| Voiceover | characters of prompt | 9 |
| Music | seconds | 4 |
Every model's allowed values are on its page under Models.
Start frames
Video models animate a start image. Send it inline, raw base64 without a data: prefix, image/png, image/jpeg, image/webp, about 150 KB at most (the whole body must stay under 300 KB):
{"model": "veo-31", "prompt": "Slow dolly-in, waves crashing", "image": {"mime_type": "image/jpeg", "base64": "<raw base64, no data: prefix>"}}Results
Poll GET /generations/{id} every few seconds. Status: running, done, failed. A failed generation is refunded in full and error_type says whether the input, the model or our side failed.