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

Errors and retries

Updated Nov 26, 2026

On this page

What an error looks like

An error answer has a code for your program to act on, a message for people, and the request's id. When a field is wrong, fields says which, with its path; the value you sent is never repeated back.

422
{
  "error": {
    "code": "invalid_request",
    "message": "Check the request fields.",
    "fields": [
      {
        "path": "body.title",
        "message": "String should have at most 160 characters"
      }
    ]
  },
  "request_id": "5d1e0c2b9f6a4f0e8a3b7c21d4e9f611"
}

Some refusals have no fields, because the request was well formed but the video is not possible. The message then says what to change:

422
{
  "error": {
    "code": "invalid_request",
    "message": "Add at least 5,850 spoken characters to your script."
  },
  "request_id": "a07c3e9d1b2f4c6e8d0a1b3c5e7f9a2d"
}

Every answer, error or not, has an X-Request-Id header with the same id, and Cache-Control: no-store. Log the id; it is the fastest way for us to find a request when you ask for help. The request log in Settings, API lists the requests of the last 30 days with their status. Let your program branch on code; the message is written for people and can change.

Should you send it again?

A request did not succeed

Look at the status first, then the code.

  • No answer, 500 or 503

    Passing trouble.

    1. Wait 1 second, then 2, 4 and on, up to a minute
    2. Send it again unchanged, with the same Idempotency-Key
    3. Still failing: log the X-Request-Id and write to us
  • 429

    Too much at once.

    1. rate_limit_exceeded: wait the seconds in Retry-After
    2. queue_full: wait until one of your videos finishes
    3. Then send it again
  • 409

    Depends on the code.

    1. operation_pending: wait, then send it again with the same key
    2. idempotency_conflict: a different request needs a new key
    3. The rest: get the video, then do what its status allows
  • Any other 4xx

    Something to fix.

    1. Read the code, the message and the fields
    2. Fix the request, the key, the plan or the balance
    3. Send it with a new key if you changed the body
Sending the same request again with the same Idempotency-Key never makes a second video, voice, avatar or render.

Every code

Status and codeWhat happenedWhat to do
400
idempotency_key_required
A call that creates, changes or deletes something came without an Idempotency-Key, or with one over 128 characters, or with spaces or other characters that are not plain and visible.Add a key and send it again.
400
invalid_request
Completing an upload found a file whose contents are not what its extension says.Delete the upload and start again with a good file.
401
invalid_api_key
No key, a key in the wrong form, or a revoked key.Check the header and the key in Settings, API.
402
insufficient_credits
Your balance does not cover the estimate.Add credits, then send it again.
402
plan_required
A live key, and the workspace has no active plan.Choose a plan.
403
insufficient_scope
The key lacks the permission this call needs. The message names it.Use a key with that permission.
403
workspace_access_denied

access_required
The key's maker is no longer an owner or manager, or (live keys) their account is still waiting for review.Make a key with someone who has access.
403
forbidden
Something this workspace or this video may not have: maker notes for anything but a Cinematic video from a script or a recording, real clips with their own sound on a Fast video, a cast or product the avatar does not have, on_camera without a video of yourself, or no channel from a member who may use only some channels.Leave it out of the request, or send the channel.
404
not_found
No video, render, upload, voice, avatar, clip, channel or Style with that id in this workspace and mode, or no such address.Check the id, and that the key is in the same mode.
405
unavailable
The address exists, but not with this method. The message speaks of a retry, but a retry fails the same way.Check the method in the reference.
409
invalid_state
The video's status does not allow that, it is being cancelled, or it has been in the making for more than 10 minutes, so it can no longer be cancelled or deleted until it is ready.Get the video, then do what its status allows.
409
operation_pending
A render or resume of this video is still being sent on, or the same request is still running.Wait a little, then send it again with the same key.
409
idempotency_conflict
This Idempotency-Key was used before with a different body.Use a new key for a new request.
409
submission_unconfirmed
A retry of adding an avatar could not confirm whether the first request made it. The message carries a reference.Send the reference to support before you try again, so the avatar is not made twice.
409
not_complete

conflict
The video is not completed yet, or its file is not stored yet; a copied Style is not ready; a video is not waiting for approval; or a Generate later offer has changed.Wait for the status the call needs, or ask for a new estimate.
409
upload_in_use

upload_processing
An upload cannot go while videos are active, or is being completed by another request.Wait, then try again.
413
request_too_large
The JSON body is over 512 KiB.Send media as an upload, never inside JSON.
413
upload_too_large

storage_full
The file is over 4 GB or over what its use allows, or the workspace has no room for it.Send a smaller file, or free some storage.
422
invalid_request
A field is wrong, or the video is not possible as asked: outside the length limits, a script too short to read for the minimum, over max_estimated_credits, an upload that is not ready, no voice and no channel that keeps one, a kind its channel does not make, a field an AI Avatar video does not take, a look on a documentary, footage that is not open yet, or a removed field such as sources. The message says which.Fix the request. Do not send it unchanged.
422
unsupported_media

size_mismatch
An upload of a type Kinema does not take, or a stored file that is not the size declared.See Uploads.
429
rate_limit_exceeded
The workspace sent 120 requests this minute in this mode.Wait the seconds in Retry-After.
429
queue_full
The workspace already has 20 active API videos in this mode.Wait for one to finish.
500
internal_error
Something went wrong on Kinema's side.Retry with the same Idempotency-Key.
503
unavailable

api_unavailable

output_unavailable

storage_unavailable

upload_unavailable

fixture_unavailable
A part of Kinema is not reachable just now.Retry after a pause, waiting longer each time.

When a video fails

Some problems only show once a video is under way. The request that created it has already answered 202, and the video itself moves to failed with an error, and sends video.failed:

error
"status": "failed",
"error": {
  "code": "generation_failed",
  "message": "The video could not be completed. You can retry with resume or contact support using the video ID."
}
CodeMeansThen
generation_failedThe video could not be made. Most failures are this one.Resume it. If it fails again, write to us with the video's id.
pausedThe video is paused for now. Everything made so far is saved.Resume it to carry on.
render_failedA video made in the app was made, but its render did not finish.Render it again in the app.
job_access_revokedThe key used to start the video was revoked.Resume it with a key that works.
cancellation_failedA cancel could not be confirmed.Cancel it again.
A code from the table aboveThe same problem, found while the video was being sent on: for example insufficient_credits, plan_required or workspace_access_denied.Fix the cause, then resume it.

Note: A long wait is not a failure

Keep the video ID and follow its status. There is no need to submit another video while this one is accepted or queued.

Rate limits

LimitValueOver it
Requests120 a minute, per workspace and mode429 rate_limit_exceeded, with Retry-After
Active API videos20 per workspace and mode429 queue_full, with no Retry-After
A JSON body512 KiB413 request_too_large
A list page20 by default, up to 100 with limit422

All keys in a workspace share its limit for their mode. Test and live have separate limits. Wait the number of seconds in Retry-After before sending another request.

Active videos are those accepted, queued, generating or rendering. One more is refused with queue_full: wait for a webhook saying one has finished. How many are made at the same time is up to your plan: see how many at once.

Which requests are safe to send again

RequestSend again?
Any GETYes. Reading changes nothing.
POST /v1/estimatesYes. It starts nothing.
POST /v1/videosYes, with the same Idempotency-Key and the same body: you get the same video back, as it is now, never a second one.
Render, resume, cancelYes, with the same key. A repeated render with the same key does not render, or charge, twice.
Approve, delete a video, delete a renderYes, with the same key: you get the first answer back.
Clone a voice, add an avatar, add to the library, copy a StyleYes, with the same key and body: you get the same answer back, never a second voice, avatar, file or Style.
POST /v1/uploadsCareful: it takes no key, so a second request makes a second upload. List your uploads first.
Complete an uploadYes. A ready upload answers with itself.
Delete an uploadYes. Once it is gone the answer is not_found.

Idempotency keys

  • What a key is. 1 to 128 visible characters, no spaces, that name one request. Your own id for the video works well, such as apollo-11-first-cut.
  • How long it lasts. For good, per workspace, mode and call. Each video has its own keys for render, resume, cancel, approve and delete, so render-1 on two videos are two keys.
  • Save it first. Store the key with your record before you send the request, so a retry after a crash uses the same one.
  • A new request, a new key. The same key with a different body is refused with idempotency_conflict. If you change the body after a refusal, use a new key. To render a video again later, use a new key too.

Retry with a pause

Send again after a dropped connection, a 5xx, or a 429 with Retry-After. Wait 1 second, then 2, 4 and so on up to a minute, and keep every header the same. Do not retry any other 4xx unchanged: it will fail the same way.

// Send one request; again after a dropped connection, a 5xx or a rate limit.
// init keeps the same Idempotency-Key header every time.
async function call(url, init = {}, tries = 6) {
  for (let attempt = 0; ; attempt++) {
    let wait = Math.min(60, 2 ** attempt);
    try {
      const res = await fetch(url, init);
      const limited = res.status === 429 && res.headers.has("Retry-After");
      if (!(res.status >= 500 || limited) || attempt === tries - 1) return res;
      if (limited) wait = Number(res.headers.get("Retry-After"));
    } catch (err) {
      if (attempt === tries - 1) throw err;
    }
    await new Promise((r) => setTimeout(r, wait * 1000));
  }
}

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.