# Errors and limits

Errors use one shape:

```json
{ "error": { "code": "not_found", "message": "Use an active project or a check ID in your workspace." } }
```

The `message` says what went wrong and what fixes it, in plain words. An agent can show it to the person as it is. Some codes add fields, listed below.

## Error codes

| Status | Code | What to do |
| --- | --- | --- |
| 400, 413 | `invalid_input` | Fix the JSON, pass one kind of input, or make the body smaller. The message names the field |
| 400 | `project_required` | No `project` was passed and the workspace has none or several active projects. `choices` lists each active project's ID and name; pass one. No check was used |
| 401 | `unauthorized` | Send a valid key with the scope the endpoint needs |
| 429 | `free_used` | Your 25 free checks are used. Nothing was checked, so it is never CLEAR. `date` is when your checks start again and `billingUrl` is the Billing page; retrying sooner won't help |
| 402 | `cap_reached` | A paid workspace reached the monthly cap it set for extra checks. Nothing was checked, so it is never CLEAR. `capCents` is the cap, `date` is when your checks start again and `billingUrl` the page where an owner can raise it |
| 402 | `plan_required` | The plan has ended. Choose a plan on [Billing](https://okaytosend.com/billing) |
| 404 | `not_found` | Use an active project or a check ID in your workspace. If the project name matches more than one, the answer lists `choices` with their IDs |
| 429 | `limit` | Wait for the `Retry-After` seconds |
| 503 | `unavailable` | The problem is on our side. Try again shortly |

## Limits

| Limit | Value |
| --- | --- |
| Requests per key | 60 a minute |
| Request body | 2,000,000 bytes |
| Images and attachments per check | 8 in total |
| Attachment size | 3 MiB each |
| Image download | 5 MiB each |
| Sources for one check | 8 |
| Source text | 200,000 characters |
| Source file | 10 MB (PDF, Word, Excel, CSV) |

## Checks a month

| Plan | Checks a month | Each extra check |
| --- | --- | --- |
| Free | 25 | None. Checks pause until your monthly reset |
| Hobby | 100 | $0.25 |
| Pro | 750 | $0.15 |
| Scale | 4,000 | $0.10 |

Extra checks stop at the monthly cap the workspace sets. See [pricing](https://okaytosend.com/pricing).
