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

# Limits

> Pagination and request idempotency for the TrueMath REST API.

## Pagination

List endpoints use cursor-based pagination. Request a page size with `limit` (1–100, default 20), and pass the `next_cursor` from the previous response as `starting_after` to fetch the next page:

```bash theme={null}
curl "https://api.truemath.ai/v1/conversations?limit=50" \
  -H "Authorization: Bearer tm_live_..."

# then, using next_cursor from the response:
curl "https://api.truemath.ai/v1/conversations?limit=50&starting_after=550e8400-..." \
  -H "Authorization: Bearer tm_live_..."
```

When `next_cursor` is `null`, you have reached the last page. See
[Conversations](/api/conversations).

## Idempotency

Send an `Idempotency-Key` header on [`POST /v1/calculate`](/api/calculate) to make the request safe to retry. The key is an opaque string you choose (a UUID is a good choice).

* **Same key, same body** — returns the original result rather than running the calculation again. This is also how you poll a natural-language request that is still `in_progress`: retry with the same key until it completes.
* **Same key, different body** — rejected with `409 error_idempotency_conflict`.

```bash theme={null}
curl https://api.truemath.ai/v1/calculate \
  -H "Authorization: Bearer tm_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 9f1c8e2a-..." \
  -d '{ "domain_id": "...", "input_format": "structured", "prompt": "..." }'
```
