# Rate limits (/docs/api/rate-limits)
Rate limits keep one busy integration from slowing down everything else. Each limit is set by your plan and counted per API key, so two services with separate keys never use up each other's allowance.

## What's limited [#whats-limited]

| Traffic | Endpoints | Counted |
| --- | --- | --- |
| Writes | `POST /v1/dock/ingest` | Per minute and per day, per key |
| Memory writes | `POST /v1/dum/write` | Against your plan's memory write limits |
| Reads | `POST /v1/engine/retrieve`, `POST /v1/dum/search`, `POST /v1/dum/federated-search` | Per minute and per day, per key |
| Answers | `POST /v1/engine/query`, `POST /v1/engine/query/stream` | Per key, and against your plan's monthly allowance |

Writes from the dashboard, such as uploads in **Sources**, don't count against your API key's write limit.

## When you hit a limit [#when-you-hit-a-limit]

| Status | Meaning | What to do |
| --- | --- | --- |
| `429` | A per-minute or per-day limit was hit. The message names which one. | Wait for the number of seconds in the `Retry-After` header, then retry. |
| `402` | Your plan's monthly allowance is used up. | Wait for the next cycle, or change plans. |

```text
HTTP/1.1 429 Too Many Requests
Retry-After: 12
```

## Stay under the limits [#stay-under-the-limits]

- **Use the SDK.** It waits for `Retry-After` and retries `429` for you. See [Errors and retries](/docs/sdks/errors-and-retries).
- **Batch writes.** One ingest can carry up to 100 events. `Dock` batches for you.
- **Use a key per service.** Each key has its own allowance.
- **Read once per turn.** Recall and retrieve at the start of a turn, not on every token.

## See your usage [#see-your-usage]

Open **Usage** in the [Docklee dashboard](https://app.docklee.com) to see how much each runtime has used, and your plan's limits.

## Next steps [#next-steps]

You know the limits. Start with the endpoint every write goes through.

<Cards>
  <Card title="Ingest events" href="/docs/api/ingest" description="Batch up to 100 events per request." />
  <Card title="Search memories" href="/docs/api/search" description="Recall from one memory space." />
  <Card title="Query an engine" href="/docs/api/query" description="Get a cited answer." />
</Cards>
