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

# Errors

> Problem details, error codes and what to do about each.

Errors use [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem details (`Content-Type: application/problem+json`), extended with a stable `code`. Branch on `code`, never on `detail`: messages may be reworded, codes never change.

```json theme={null}
{
  "type": "https://docs.argil.ai/v2/platform/errors#parameter_invalid",
  "title": "Invalid parameter",
  "status": 400,
  "detail": "2 parameters are invalid.",
  "code": "parameter_invalid",
  "param": "/input/duration",
  "request_id": "req_8c1e4b7d2a9f4e6c8b0d3f5a7c9e1b24",
  "retryable": false,
  "errors": [
    { "code": "parameter_invalid", "param": "/input/duration", "detail": "\"duration\" must be <= 30.", "allowed_values": [{ "minimum": 4, "maximum": 30 }] },
    { "code": "parameter_invalid", "param": "/input/resolution", "detail": "\"resolution\" must be one of \"480p\", \"720p\", \"1080p\".", "allowed_values": ["480p", "720p", "1080p"] }
  ]
}
```

| Field | |
| - | - |
| `type` | Link to this page, at the code’s section. |
| `status` | The HTTP status, repeated. |
| `code` | Stable machine code, listed below. |
| `detail` | What went wrong in this request. Safe to log and to show. |
| `param` | The field at fault: a JSON pointer into the body (`/input/duration`), or a query or path parameter’s name (`limit`). |
| `errors` | Every issue, when there are several. |
| `allowed_values` | What is accepted: values, or `{minimum, maximum}` ranges. |
| `retryable` | Whether the same request may succeed later. |
| `request_id` | Also in the `Request-Id` header. Quote it to support. |
| `billing` | On `insufficient_credits`: `required` and `available` credits. On `credit_limit_exceeded`: `required` and your `limit`. |
| `url` | On `plan_required`, `insufficient_credits` and `approval_required`: where a person resolves it, signed in to Argil. It also ends `detail`. |

These are errors of the **request**: nothing was created. A generation that is accepted and fails later has an `error` on the generation itself; see [Generations → Failures](https://docs.argil.ai/v2/generate/generations.md#failures).

## 400 Bad Request

### invalid\_json

The body is not valid JSON, or not sent as `Content-Type: application/json`.

### invalid\_multipart

A file upload whose `multipart/form-data` body cannot be read: a missing or wrong boundary, or a truncated body. Most HTTP clients build it for you: let them set the `Content-Type` header.

### parameter\_missing

A required field is missing. `param` points at it.

### parameter\_invalid

A field has the wrong type, is out of range, or is not one of the allowed values for this model and mode. `allowed_values` lists what works.

### parameter\_unknown

A field is not part of this mode’s input. Argil rejects unknown fields instead of ignoring them, so a typo never silently changes your output.

### reference\_not\_found

An asset is not in your library, an element does not exist in your workspace or among Argil’s public ones, or an element has no plate with that label.

### reference\_not\_allowed

This mode does not take this reference: too many images, a video where only images are accepted, a video too long, a `lore` element, or a file that failed processing. `detail` says which.

## 401 Unauthorized

### authentication\_required

No API key was sent.

### invalid\_api\_key

The key is unknown or revoked.

## 402 Payment Required

### insufficient\_credits

Your balance does not cover what the generation reserves. `billing.required` and `billing.available` say by how much, and `url` is where a person adds credits to this workspace, signed in to Argil. See [Credits](https://docs.argil.ai/v2/account/credits.md).

### credit\_limit\_exceeded

The generation would reserve more than the `max_credits` you set on the request. Nothing was created or reserved. `billing.required` is the price and `billing.limit` your ceiling.

## 403 Forbidden

### plan\_required

Generating, and running an agent session, need an active Argil plan for the workspace. `url` links to the plans for this workspace, where a person takes one; `POST /v2/checkout` gives a person a link to pay for one. See [Plans](https://docs.argil.ai/v2/account/plans.md).

### admin\_required

Only an admin of the workspace can buy or change its plan: ask one of them.

### api\_access\_required

API v2 is in early access, and the API key's owner is not in it yet. Contact Argil to join.

### approval\_required

Over MCP, a budget answer is refused: only a person raises a session's budget. `url` is the link to give them; they raise it there, signed in to Argil.

## 404 Not Found

### resource\_not\_found

No such object in your workspace, or no such route.

### model\_not\_found

The model does not exist or is not enabled for your workspace. The catalog is your playground’s.

### mode\_not\_supported

The model exists but does not have this mode. `allowed_values` lists its modes.

## 405 Method Not Allowed

### method\_not\_allowed

The path exists, but not with this method. The `Allow` header lists the methods it takes.

## 409 Conflict

### asset\_not\_uploaded

A referenced asset was still `pending_upload` after 60 seconds: send its bytes to `upload.url` first.

### asset\_not\_ready

A referenced asset was still processing after 60 seconds, or a file is not ready to download. Retry once its status is `ready`.

### generation\_not\_terminal

Only final generations can be deleted, once their `generation.succeeded` or `generation.failed` event is sent (usually seconds after). Wait for it to finish, then retry.

### session\_busy

The agent is working on this [session](https://docs.argil.ai/v2/agent/sessions.md): send the message again once the session is `idle`, or stop it first. Retryable.

### question\_closed

An answer names a question that is no longer open: someone answered in the app first, or the session moved on. Read the session again and answer its current questions.

### artifact\_changed

The storyboard changed since the `revision` your answer names. Read it again, show it, and answer with its new revision.

### too\_many\_webhook\_endpoints

A workspace has at most 16 webhook endpoints. Delete one first.

### platform\_key\_refused

Only your workspace's own provider keys could run this model, and the platform refused them (invalid, revoked, out of quota or billing). Nothing was created or charged. Fix the key in workspace settings › Provider keys, or let the workspace fall back to Argil's keys, then retry.

### idempotency\_key\_in\_use

Another request with this `Idempotency-Key` is still being processed. Nothing was created by this one. Retry the same request in a few seconds: you then get the generation the first request created, or a new one if it failed.

## 411 Length Required

### length\_required

A file sent in the request needs a `Content-Length` header.

## 413 Content Too Large

### payload\_too\_large

A JSON body is over 1 MB, or a file sent in the request over 100 MB. Send larger files through a [signed upload](https://docs.argil.ai/v2/library/assets.md).

## 422 Unprocessable Content

### url\_unreachable

A URL in the request could not be reached: its host does not resolve, it times out, or it answers `5xx`. Retry later. A URL that is not on the public internet, or answers `4xx`, is a `400 parameter_invalid`.

### idempotency\_key\_reused

The `Idempotency-Key` was already used with a different request, or the generation it created was deleted since. Nothing was created. Use a new key for a new request; see [Idempotency](https://docs.argil.ai/v2/platform/idempotency.md).

## 429 Too Many Requests

### rate\_limited

Too many requests from your workspace. Wait `Retry-After` seconds. See [Rate limits](https://docs.argil.ai/v2/platform/rate-limits.md).

### too\_many\_queued\_generations

Your workspace has too many generations waiting for capacity. Wait for some to start.

### too\_many\_running\_sessions

The workspace already runs 5 agent sessions at once. Start or resume this one when one of them is idle.

### too\_many\_asset\_imports

`POST /v2/assets` with a `url`, while 5 assets of your workspace are still processing. Retry once some are ready.

## 500 Internal Server Error

### internal\_error

Unexpected error on our side; `detail` carries the request id. Retry with backoff.

## 503 Service Unavailable

### service\_unavailable

A service the model depends on is down. Retry with backoff.

## Retrying

| Status | Retry? |
| - | - |
| `400`, `401`, `404` | No: fix the request. |
| `402`, `403` | After a top-up or a plan change. |
| `409` | After the asset or the generation is ready. Not `too_many_webhook_endpoints`, nor `platform_key_refused` until the key is fixed. |
| `411`, `413` | No: fix the request. |
| `422` | Yes, later. |
| `429` | Yes, after `Retry-After`. |
| `5xx`, network errors | Yes, with exponential backoff. Before retrying a create that timed out, check `GET /v2/generations`: the first request may have gone through. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.