Cookies on Kinema

We use cookies only to keep you signed in, keep Kinema secure and remember this choice. Visits and page speed are counted in aggregate, without cookies or ads. You can turn that off in Preferences.

Kinema Studio 2 is here!

Read more

API quickstart

Updated Nov 26, 2026

On this page

How it works

  1. Key

    A test key from Settings, API.

    • Its secret is shown once
  2. Price

    POST /v1/estimates with the video's body.

    • Starts nothing
  3. Start

    POST /v1/videos with the same body.

    • Answers at once, status accepted
  4. Follow

    Ask for the video, or get a webhook.

    • A test video is done in under a minute
  5. Download

    A link to the file, good for an hour.

With a test key nothing is made and nothing is charged: the video walks through every status and its download is a sample file.

Make a test video

  1. 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, API tab in the Kinema workspace: the Keys list with name, Live or Test, the start of each key, its permissions, when it was created and last used, and Revoke; the Create key button; and under it the Webhooks list with two endpoints, each with Send test, Deliveries and Remove.
    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 Create an API key dialog: a Name field, Mode with Test chosen and the note that test keys return sample videos and never use credits, and five permissions with Read videos, Make and edit videos and Read usage and prices ticked, Read uploads and Upload files not ticked, then Cancel and Create key.
    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 Your new key dialog after Create key: Publishing server, test mode. The Secret key box holds the whole secret, a sample that starts kin_test_ExampleOnly, with a Copy button beside it. Under it the line This is the only time it is shown. Keep it somewhere safe, and the Done button.
    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.

  2. 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.

    Shell
    export 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.

  3. 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"
    Response
    {
      "data": [{ "voice_id": "test_voice", "name": "Sandbox voice" }],
      "next_cursor": null
    }
  4. Check the price

    Build the body you will create the video with, and send it to /v1/estimates. The script comes from script.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.json
    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 422 and a message that says how many characters to add. Notes such as [B-ROLL: ...] are followed, not read aloud, and do not count.

  5. Create the video

    Send the same body to /v1/videos with an Idempotency-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.json

    The answer comes at once, with 202 and the video. progress.stage says 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": []
    }
  6. Wait for it

    Ask for the video every 30 seconds or so until its status is completed, or stop at failed or cancelled. 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"
  7. 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"
    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 keyWhat to know
CreditsThe 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.
VoicesUse a voice_id from /v1/voices. For a library voice, also send its owner_id.
LengthA video outside 6 to 40 minutes is refused with 422 before anything starts.
TimeA real video takes far longer than a test one. Let a webhook tell you when it is done rather than keeping a loop open.
ChannelsSend 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 editorSend "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.

On this page

Cookie preferences

Choose what Kinema may use on this site. You can change this at any time from Cookie preferences at the bottom of every page.

Strictly necessary

Sign-in, security and remembering this choice.

Always on

Visit counting

Counts visits and page speed in aggregate, without cookies. No ads, and no tracking across other sites.

More in the Privacy Policy.