# Limits

> Request size, request rate, metadata, memory ids, the size ceiling and the free plan's allowances.

| Limit | Value | When it is hit |
|---|---|---|
| Request body | 16 MB | `400 invalid_request` |
| Request rate | 50 requests a second per key, bursts up to 200 | `429 rate_limited`; retry after a second |
| Memory metadata | 16 pairs; keys up to 64 characters, values up to 512 | `400 invalid_request` |
| Memory id | `mem_` and 24 letters and digits | `400 invalid_request` |
| Context window assumed | 200k tokens | Nothing is refused; see below |
| Free plan | A monthly allowance of user turns and a cap on memories | `429 quota_exceeded` |

The request rate protects the service; it is not a plan limit. `decorate` treats a `429` like an outage and [falls back to the local tail](https://threadlessai.com/docs/failure-behaviour), so your model call still goes ahead.

## The size ceiling

We keep the history under a ceiling that assumes a 200k-token context window, with room left for the reply. It is the same for every customer and every model, and it does not change with your plan. A model with a smaller window is not refused.

The part of a request that forgetting cannot shrink (your instructions, your tools and the facts block) is measured on every call and subtracted first. The current user turn is never forgotten. If your instructions and tools alone fill most of a 200k window, forgetting has little room to work with.

## Turns

A turn is a `decorate` call that carries a new user message. Calls inside a tool loop, which carry only the model's reply and tool results, are not turns. Turns are what the [user turns meter](https://threadlessai.com/pricing) counts and what the free plan's monthly allowance counts.

## The free plan

The free plan's allowances are being finalised with pricing. When one is used up, `decorate` and `POST /memories` answer `429 quota_exceeded` with a message naming the allowance; `decorate` falls back to the local tail meanwhile.
