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

# Errors

> Standard HTTP status codes returned by the Sapient API.

Sapient uses standard HTTP status codes. Every error body carries a machine-readable `error` code and a human `message`:

```json theme={null}
{ "error": "unauthorized", "message": "Missing, invalid, or revoked API key." }
```

| Status | `error`                      | Meaning                                                                                      |
| ------ | ---------------------------- | -------------------------------------------------------------------------------------------- |
| `400`  | `bad_request`                | Malformed body: bad `input`, or an invalid `webhook_url`.                                    |
| `401`  | `unauthorized`               | Missing, invalid, or revoked API key.                                                        |
| `402`  | `insufficient_balance`       | Out of credits. The first \$2.50/month is free; add a prepaid deposit in **Settings → API**. |
| `403`  | `plan_required` / `no_owner` | A paid plan is required to use the API, or the key isn't tied to a user.                     |
| `404`  | `not_found`                  | No such scan, or it belongs to another org.                                                  |
| `405`  | `method_not_allowed`         | Wrong HTTP verb for the endpoint.                                                            |
| `429`  | `rate_limited`               | Too many requests. Retry with backoff.                                                       |
| `500`  | `internal_error`             | Something went wrong on our end.                                                             |
| `502`  | `submit_failed`              | The scan couldn't be dispatched to the model.                                                |
