The API
Create and check on AI videos from your own code or scripts – one API key, plain JSON, no SDK required. Looking for an AI agent instead? See the MCP guide.
Getting a key
API keys are available to subscription and team accounts (the same accounts that can make unlimited videos). Sign in, open Profit Dashboard, and find API keys next to My credits. Give the key a label (e.g. "my render bot") and press Create key – the full key is shown once, so copy it straight away. Only its hash is ever stored on our side; if you lose it, revoke it and create a new one.
Authentication
Send your key as a bearer token on every request:
Authorization: Bearer ccdk_your_key_here
There is no sign-in cookie, no Origin check, no CORS restriction – this is a plain server-to-server API. Keep your key secret; anyone with it can create videos on your account's credits.
Base URL
https://ccd-ai-images.dazza3103.workers.dev/api/v1
Create a video
Body is JSON: a title, an opening hook, and a list of scenes. Each scene is one spoken sentence plus a description of its picture (no text, logos or brand names in the picture). Up to 48 scenes (≈4 minutes); vertical 9:16 by default.
curl -s https://ccd-ai-images.dazza3103.workers.dev/api/v1/videos \
-H "Authorization: Bearer ccdk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "GTA 6 hidden facts",
"hook": "You missed this in the trailer.",
"format": "short",
"scenes": [
{ "say": "Most players never noticed this one detail.", "visual": "a cinematic city street at dusk, neon reflections on wet asphalt" },
{ "say": "Here is what it actually means for the story.", "visual": "a close-up of a hand reaching for a glowing object" }
]
}'
Returns straight away (rendering happens on rented GPUs in the background):
{ "id": "20261126141624-41430e", "est_s": 1271, "gpus": ["RTX 5090","RTX 4090"],
"stored": false, "charged": 482, "balance": 4084, "price_credits": 482 }
Check a video
Poll this while a video is rendering (every 10–15 seconds is plenty). video is a temporary signed download link, present once state is "done".
{ "id": "20261126141624-41430e", "state": "done", "status": "Done", "title": "GTA 6 hidden facts",
"scenes": 2, "credits": 482, "elapsed_s": 96, "watermark": false,
"video": "https://…signed-link…" }
Other endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /videos | Your 30 most recent videos |
| DELETE | /videos/:id | Cancel a video that is still rendering (GPUs switch off, unused credits refunded automatically) |
Pricing
Each video is priced in credits before it starts, exactly like the dashboard (1,000 credits = A$1.00) – see the live Pricing page or fetch GET /public/pricing (no key needed) for the current price per scene. If your balance is too low, a create call returns 402 with the credits needed.
Rate limits & errors
| Status | Meaning |
|---|---|
| 401 | Missing, wrong, or revoked API key |
| 402 | Not enough credits for this video |
| 404 | Video not found (wrong id, or it belongs to a different key) |
| 409 | You already have a video rendering – wait for it to finish, or cancel it |
| 429 | More than 20 requests in a minute on this key – wait a minute |
| 503 | No GPU is free right now – nothing was charged, try again shortly |
Error responses are always { "error": "a plain-English message" }.
Ready to build?
Sign in, open Profit Dashboard, and create your first API key.