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

# Errors

> The error envelope and every error code the agent API can return.

Every failure returns the same JSON envelope with the matching HTTP status:

```json theme={null}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request",
    "details": {
      "fieldErrors": { "fileUrl": ["`fileUrl` must be a valid http(s) URL"] },
      "formErrors": []
    }
  }
}
```

* **`code`** — a stable, machine-readable string. Branch on this, not the message.
* **`message`** — a human-readable explanation; wording may change.
* **`details`** — present for `VALIDATION_ERROR` only: a flattened map of field issues.

When a run is accepted but then fails internally, the envelope also carries a top-level
`runId` so support can trace it.

## Codes

| Code | HTTP | Meaning | What to do |
| - | - | - | - |
| `UNAUTHORIZED` | 401 | Missing, malformed, unknown or revoked API key. | Check the `Authorization` header and that the key is active. |
| `VALIDATION_ERROR` | 400 | The body failed schema validation, or none of `content`/`fileBase64`/`fileUrl` was supplied. | Inspect `details` and fix the offending fields. |
| `SUBSCRIPTION_REQUIRED` | 402 | The workspace has no active subscription. | Resolve billing in the dashboard. |
| `FEATURE_NOT_AVAILABLE` | 403 | The plan doesn't include API access (Professional and above), or doesn't include the Agent Builder. | Upgrade the plan. |
| `NOT_FOUND` | 404 | No agent with that slug exists in the workspace. | Check the slug and that the key's workspace owns the agent. |
| `AGENT_DISABLED` | 403 | The agent exists but is disabled. | Re-enable it in the dashboard. |
| `NOT_PUBLISHED` | 409 | The agent has no published version. | Publish the agent before calling it. |
| `PAYLOAD_TOO_LARGE` | 413 | A `fileBase64` exceeds \~10.5 MB once decoded. | Send a smaller file, or use `fileUrl`. |
| `RATE_LIMITED` | 429 | The agent's per-minute or per-day throttle was exceeded. | Back off using the `Retry-After` header. See [rate limits](https://equatetravel.ai/docs/api-reference/rate-limits.md). |
| `RUN_FAILED` | 400 or 502 | The run failed. `400`: the document couldn't be opened (a `fileUrl` that couldn't be fetched, invalid base64, a password-protected PDF). `502`: the document couldn't be read by the models. | For a `400`, fix the document and send it again. For a `502`, retry; if it persists, contact support with the `runId`. |
| `INTERNAL_ERROR` | 500 | An unexpected server error. | Retry with backoff; contact support if persistent. |

## Batch errors

Batch requests are validated as a whole (a malformed item, an empty `items` array, or
more than 100 items returns `400`). Once accepted, items run **independently** — a
failure on one item does not fail the batch. Inspect each entry's `ok` flag and `error`
field in the `results` array instead of relying on the HTTP status. See
[Run an agent over a batch](https://equatetravel.ai/docs/api-reference/agents/batch.md).


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