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. |
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/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 and typeship 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.