API quickstart
On this page
How it works
Key
A test key from Settings, API.
- Its secret is shown once
Price
POST /v1/estimates with the video's body.
- Starts nothing
Start
POST /v1/videos with the same body.
- Answers at once, status accepted
Follow
Ask for the video, or get a webhook.
- A test video is done in under a minute
Download
A link to the file, good for an hour.
Make a test video
Create a test key
In your workspace, open Settings, then API, and press Create key. The owner of the workspace and the managers of a team see this tab; editors do not.

Settings, then API: your keys, your webhook endpoints, and below them the request log. Give the key a name, leave Test selected, and add Read uploads to the three permissions already ticked. It lets the key list voices.

The dialog opens on Test with three permissions ticked. Tick Read uploads too. Press Create key and copy the secret. Test keys start with
kin_test_.
The secret appears once. Copy it before you press Done. Warning: The secret is shown once
The full key is shown only once. If you lose it, revoke the key and make another.
Keep the key out of your code
Put the secret in an environment variable, never in code you share or commit. Keys are for your servers: never put one in a web page or an app other people can download.
Shellexport KINEMA_API_KEY="kin_test_your_secret"Pick your language once on any example below and every example follows. The JavaScript examples are modules: save them in a file that ends in
.mjs.Find a voice
A video from a script needs a voice. A test key always gets
test_voice; a live key gets your own cloned voices first, then the library.curl https://app.kinema.cc/v1/voices \ -H "Authorization: Bearer $KINEMA_API_KEY"const BASE = "https://app.kinema.cc/v1"; const auth = { Authorization: `Bearer ${process.env.KINEMA_API_KEY}` }; const voices = await fetch(`${BASE}/voices`, { headers: auth }).then((r) => r.json()); console.log(voices.data);import os import requests BASE = "https://app.kinema.cc/v1" auth = {"Authorization": f"Bearer {os.environ['KINEMA_API_KEY']}"} voices = requests.get(f"{BASE}/voices", headers=auth).json() print(voices["data"])Response{ "data": [{ "voice_id": "test_voice", "name": "Sandbox voice" }], "next_cursor": null }Check the price
Build the body you will create the video with, and send it to
/v1/estimates. The script comes fromscript.txt, so its quotes and line breaks are sent as they are. Everything you leave out has the app's own default: footage from the web, sound effects and graphics on, captions off, and a Style Kinema chooses. The answer has the minutes, the credits, the lines the price is made of and your balance; a test key always shows 25,000 and spends none of it.jq -n --rawfile script script.txt '{ title: "Apollo 11: Eight Days to the Moon", script: $script, voice: { id: "test_voice" }, maker: "standard", music: true }' > video.json curl https://app.kinema.cc/v1/estimates \ -H "Authorization: Bearer $KINEMA_API_KEY" \ -H "Content-Type: application/json" \ --data-binary @video.jsonimport { readFile } from "node:fs/promises"; const body = { title: "Apollo 11: Eight Days to the Moon", script: await readFile("script.txt", "utf8"), voice: { id: "test_voice" }, maker: "standard", music: true, }; const estimate = await fetch(`${BASE}/estimates`, { method: "POST", headers: { ...auth, "Content-Type": "application/json" }, body: JSON.stringify(body), }).then((r) => r.json()); console.log(estimate.estimated_minutes, estimate.estimated_credits, estimate.balance);with open("script.txt", encoding="utf-8") as f: script = f.read() body = { "title": "Apollo 11: Eight Days to the Moon", "script": script, "voice": {"id": "test_voice"}, "maker": "standard", "music": True, } estimate = requests.post(f"{BASE}/estimates", headers=auth, json=body).json() print(estimate["estimated_minutes"], estimate["estimated_credits"], estimate["balance"])Response{ "generate_later": { "available": false, "discount_percent": 0, "scheduled_at": null, "wait_label": null, "credits_now": 128, "credits_later": null, "offer_id": null, "total_now": 128, "total_later": null }, "estimated_minutes": 6.4, "estimated_credits": 128, "lines": [ { "key": "base", "label": "Video", "credits": 128 } ], "eta_minutes": null, "notes": [], "balance": 25000, "mode": "test", "minimum_minutes": 6, "maximum_minutes": 40, "notice": "An initial estimate, not a final-charge cap. Final credits follow measured usage. Test keys never spend credits.", "spoken_characters": 6240, "script_cues": [] }Note: A script long enough for a video
A video runs 6 to 40 minutes. In English a script needs about 5,850 spoken characters, roughly 1,000 words, to fill 6 minutes. A shorter one is refused with
422and a message that says how many characters to add. Notes such as[B-ROLL: ...]are followed, not read aloud, and do not count.Create the video
Send the same body to
/v1/videoswith anIdempotency-Key: 1 to 128 visible characters, no spaces, that name this one video. Save it with your own record first. If the request fails or times out, send it again with the same key and you get the same video back, never a second one.curl https://app.kinema.cc/v1/videos \ -H "Authorization: Bearer $KINEMA_API_KEY" \ -H "Idempotency-Key: apollo-11-first-cut" \ -H "Content-Type: application/json" \ --data-binary @video.jsonconst video = await fetch(`${BASE}/videos`, { method: "POST", headers: { ...auth, "Content-Type": "application/json", "Idempotency-Key": "apollo-11-first-cut" }, body: JSON.stringify(body), }).then((r) => r.json()); console.log(video.id, video.status); // 3f9a1c07be acceptedvideo = requests.post( f"{BASE}/videos", headers={**auth, "Idempotency-Key": "apollo-11-first-cut"}, json=body, ).json() print(video["id"], video["status"]) # 3f9a1c07be acceptedThe answer comes at once, with
202and the video.progress.stagesays what it is doing, in the words the app shows.Response{ "clip_sounds": null, "reference_skips": null, "id": "3f9a1c07be", "title": "Apollo 11: Eight Days to the Moon", "status": "accepted", "mode": "test", "kind": "documentary", "channel_id": null, "maker": "standard", "style": { "id": "auto", "name": "Let Kinema choose" }, "finish": "render", "made_in": "api", "progress": { "percent": null, "stage": "Waiting in line", "time_left_minutes": null, "queue_position": null }, "scheduled_at": null, "cancellable_until": null, "duration_seconds": null, "cancel_requested": false, "created_at": "2026-11-26T14:02:11.408Z", "updated_at": "2026-11-26T14:02:11.408Z", "credits": { "estimated": 128, "reserved": 0, "charged": 0 }, "error": null, "app_url": null, "editor_url": null, "script_cues": [] }Wait for it
Ask for the video every 30 seconds or so until its status is
completed, or stop atfailedorcancelled. A test video changes status automatically. In production, let a webhook tell you instead.curl https://app.kinema.cc/v1/videos/3f9a1c07be \ -H "Authorization: Bearer $KINEMA_API_KEY"let v = video; while (!["completed", "failed", "cancelled"].includes(v.status)) { await new Promise((r) => setTimeout(r, 30_000)); v = await fetch(`${BASE}/videos/${video.id}`, { headers: auth }).then((r) => r.json()); console.log(v.status); }import time v = video while v["status"] not in ("completed", "failed", "cancelled"): time.sleep(30) v = requests.get(f"{BASE}/videos/{video['id']}", headers=auth).json() print(v["status"])Download it
When the video is
completed, ask for its download. The answer is a link that works for an hour; ask again for a new one. Fetch the file from it without your key. With a test key it is always the same sample file.curl https://app.kinema.cc/v1/videos/3f9a1c07be/download \ -H "Authorization: Bearer $KINEMA_API_KEY" # then fetch the file from the url in the answer, without your key curl -L -o apollo-11.mp4 "$DOWNLOAD_URL"import { writeFile } from "node:fs/promises"; const dl = await fetch(`${BASE}/videos/${video.id}/download`, { headers: auth }).then((r) => r.json()); const file = await fetch(dl.url); // no key: the link itself is the permission await writeFile("apollo-11.mp4", Buffer.from(await file.arrayBuffer()));dl = requests.get(f"{BASE}/videos/{video['id']}/download", headers=auth).json() with requests.get(dl["url"], stream=True) as file, open("apollo-11.mp4", "wb") as out: for chunk in file.iter_content(1 << 20): out.write(chunk)Response{ "url": "https://app.kinema.cc/v1/sandbox/sample.mp4", "expires_at": "2026-11-22T15:03:40.112Z", "mode": "test", "notice": "A fixed test fixture, not generated content." }
Go live
Create a second key with Live selected and put it in place of the test key. Nothing else in your code changes. A live key needs a workspace with an active plan, and its maker's account must have full access.
| With a live key | What to know |
|---|---|
| Credits | The estimate is held from your workspace's balance when the video starts, then settled on its real length. Send max_estimated_credits to refuse a video whose estimate is higher. See Estimates and credits. |
| Voices | Use a voice_id from /v1/voices. For a library voice, also send its owner_id. |
| Length | A video outside 6 to 40 minutes is refused with 422 before anything starts. |
| Time | A real video takes far longer than a test one. Let a webhook tell you when it is done rather than keeping a loop open. |
| Channels | Send a channel_id from /v1/channels and leave out what the channel keeps: its voice, maker, Style, footage, music and the rest. A test key has two sandbox channels to try it with. See On a channel. |
| The editor | Send "finish": "editor" to stop at ready, change the video in the editor from its editor_url, then render it there or through the API. See Render or edit first. |
Warning: A live key spends credits
Each live video you create holds its price from your balance as it starts. Test your code with a test key first, and give the live key only the permissions it needs.
Need a hand?
Ask on Discord, or write to hello@kinema.cc.