---
title: "Rate limits"
description: "Limits on the typeship API, what a 429 looks like, and how the generated tooling handles it for you."
url: https://typeship.dev/docs/typeship-api/api/rate-limits
markdown: https://typeship.dev/docs/typeship-api/api/rate-limits.md
section: "Get started"
---
> ## Documentation index
> Fetch the complete documentation index at https://typeship.dev/llms.txt (every page, one line each) or the full text at https://typeship.dev/llms-full.txt.
> Append .md to any docs URL, or send Accept: text/markdown, for the markdown twin of that page.

# Rate limits

Limits on the typeship API, what a 429 looks like, and how the generated tooling handles it for you.

| Scope                                      | Limit                                                     |
| ------------------------------------------ | --------------------------------------------------------- |
| Anonymous generation (`POST /v1/generate`) | 20 requests per minute per IP address                     |
| Authenticated endpoints                    | 60 requests per minute per API key                        |
| Hosted generations                         | Per plan. See [Plans and limits](https://typeship.dev/docs/reference/limits). |

Anonymous generation also reports its budget as it goes: `X-RateLimit-Limit` and `X-RateLimit-Remaining` ride on every anonymous response, so a client can pace itself before it hits the wall. Limits are counted in one shared store, so they hold across regions and instances.

Over the limit, the API returns `429` with the code `rate_limited` and a `Retry-After` header in seconds:

```http
HTTP/1.1 429 Too Many Requests
Retry-After: 42
Content-Type: application/json

{ "errors": [{ "code": "rate_limited", "message": "Too many requests. Retry after 42s." }], "request_id": "req_..." }
```

## What the tooling does

The [typeship SDK](https://typeship.dev/docs/sdks) and [typeship CLI](https://typeship.dev/docs/cli) retry `429` automatically with backoff, honoring `Retry-After`, up to two retries by default. Most scripts never see the status. If yours does, back off and retry after the header's value.

## Generation is the expensive call

Generation runs the whole engine on your spec, and large specs take seconds. If you are generating in a loop, you almost certainly want a project instead. Projects regenerate when the spec changes and not otherwise. See [Regeneration](https://typeship.dev/docs/projects/regeneration).

## Sitemap

[Every page of these docs](https://typeship.dev/llms.txt)
