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

> ## Agent Instructions
> getclean's own MCP server is at https://mcp.getclean.ai/mcp. The /mcp path of this docs site is Mintlify's search over these pages, not getclean.
> Every answer of the API opens with outcome. A page that could not be read is a record whose outcome says why, never an HTTP error; read outcome before anything else.
> The API's contract is the OpenAPI 3.1 file at https://docs.getclean.ai/openapi.yaml; the SDKs are generated from it.
> The product's name is written getclean, in lower case.

# Size limits, rate limits, and time limits

> The size limits of requests and responses, the rate limits of a key, and the time limits of calls, in one place. One call, get_limits, returns the values that apply to your key.

Every limit of the API has a stated value, and a request that passes one is told which. `get_limits` returns all of them for your key, with the prices, the balance, the file types, and the countries a page can be read from.

## Read the limits of your key

```bash cURL theme={"theme":"css-variables"}
curl https://api.getclean.ai/v1/limits \
  --header "Authorization: Bearer $GETCLEAN_API_KEY"
```

```python Python theme={"theme":"css-variables"}
from getclean import GetClean

client = GetClean()

limits = client.get_limits()
```

```typescript TypeScript theme={"theme":"css-variables"}
import { GetClean } from "getclean";

const client = new GetClean();

const limits = await client.getLimits();
```

The call costs nothing. An agent that reads it once at the start of a run knows every limit it can meet.

## Size limits of text

| What | Limit |
| - | - |
| Text in one response, `max_characters` | `0` for the outline alone, or from 1,000 to 1,000,000 characters, with a default of 20,000. |
| Text in a whole batch of fetches | From 1,000 to 2,000,000 characters, with a default of 200,000. |
| Text in a whole search response | From 1,000 to 200,000 characters, with a default of 40,000. |
| A summary | At most 1,500 characters. |
| The excerpt of a search result | From 0 to 4,000 characters, with a default of 600. |

A text that is longer than the size limit is not cut in the middle of a sentence. The outline comes in its place, and each section is read by its id.

## Size limits of requests

| What | Limit |
| - | - |
| Strings in `highlights` | From 1 to 5, each of at most 4,000 characters. |
| Highlights found in one call | At most 50. |
| Items of a batch | From 1 to 20. |
| Wordings of a search | The question and up to 10 others, and at most 20 in all. |
| Datasources of a search | At most 10. |
| Results of a search | From 1 to 50. The default is 10. |
| Results that a search fetches | At most 10. |
| A file | At most 100 MiB. |
| A JSON request body | At most 256 KB, and 4 MiB for a batch. |

## Time limits

| What | Limit |
| - | - |
| The work of a fetch or an upload, `wait_seconds` | From 5 to 90 seconds, with a default of 30. |
| The work of a search, `wait_seconds` | From 0.2 to 60 seconds, with a default of 10. |
| A job that reads a long document | 30 minutes. |
| A stored record or a stored search | 48 hours after its last use, and at most 30 days. |
| A finished job | 30 days. |

A call that reaches its time returns what it has. A document that was not finished comes back as `partial`, and a search says which part is missing.

## Rate limits

A key has 2 rate limits: the number of requests in a minute, and the number of calls that can be in flight at once. `get_limits` returns both in `rates`, and every response has them in the headers `RateLimit` and `RateLimit-Policy`.

A request over a rate limit returns the problem `rate-limit-exceeded` or `concurrency-limit-exceeded`, with the number of seconds to wait in `retry_after_seconds`. The SDKs wait and send the request again.


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