---
title: "Errors"
description: "Error codes returned by the REST API and the MCP tools."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.mosio.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

Errors have the same shape in the REST API and in MCP tool results:

```json
{
  "error": "invalid_variables",
  "message": "Variabel template tidak valid.",
  "details": { "harga": ["Too big: expected string to have <=24 characters"] }
}
```

`error` is a stable code you can match on. `message` is written for people, in Indonesian. `details` is present when there is more to say, such as which fields to fix.

| Code | HTTP | Meaning |
| --- | --- | --- |
| `unauthorized` | 401 | No API key was sent. |
| `invalid_api_key` | 401 | The API key is not valid or was deleted. |
| `insufficient_scope` | 403 | The key or sign-in lacks the permission this call needs (`videos:create` or `videos:read`). |
| `forbidden` | 403 | The request was refused. |
| `invalid_input` | 400 / 422 | The body does not match the schema, or the output size is not supported. |
| `unknown_template` | 404 | No template with this id. |
| `invalid_variables` | 422 | Variables are missing or too long. `details` names them. |
| `invalid_composition` | 422 | The HTML cannot be rendered yet. `details.problems` lists each problem with a code and hint. |
| `idempotency_conflict` | 409 | The `idempotency_key` was used before with a different body. |
| `insufficient_credits` | 402 | Not enough credits for this video. |
| `too_many_active_renders` | 429 | Two videos are already queued or rendering in this workspace. |
| `duration_too_long` | 422 | The video is longer than 60 seconds. |
| `not_found` | 404 | No such video in this workspace. |
| `internal_error` | 500 | Something failed on our side. Try again shortly. |

A video that fails while rendering does not return an error to the request that created it: the video's `status` becomes `failed`, its `error` explains why, and its credits are returned.

Source: https://docs.mosio.me/reference/errors/index.mdx
