Rate limits
Rate limits apply by organization and operation bucket. Requests from different users, tokens, or workers share a limit when they hit the same bucket in the same organization.
Request limits
Both the one-minute and one-day windows must have room. Each is a fixed window that starts with the first counted request, not a calendar boundary. These are the baseline policies; your organization’s plan or overrides can change the effective values.
| Bucket | Examples | Per minute | Per day |
|---|---|---|---|
read | List sessions, open an event stream | 600 | 50,000 |
write | Submit a prompt, send a session message, create a thread | 300 | 20,000 |
session | Create a session, archive a thread | 20 | 200 |
The session bucket has higher plan defaults. Organization overrides can replace either window’s limit.
| Plan | Per minute | Per day |
|---|---|---|
| Pro or Max | 60 | 1,000 |
| Ultra | 120 | 5,000 |
| Team | 240 | 10,000 |
| Enterprise | 600 | 50,000 |
Buckets are assigned by operation, not HTTP method: creating a session and sending a session message are both POST requests, but they use different limits. These are request limits, not a cap on concurrent sessions or streams. Opening or reconnecting a stream uses the read budget; events arriving over an open stream do not each make another request.
Response headers
When the API has a rate-limit result to report, the X-RateLimit-* headers describe the applicable window with the fewest requests remaining. If windows tie, the headers report the one that resets later. One response does not report both windows.
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Maximum requests in the reported window. |
X-RateLimit-Remaining | Requests left in that window as of this check. |
X-RateLimit-Reset | When that window resets, as Unix epoch seconds. |
Retry-After | On an App API rate-limit rejection, seconds to wait before retrying. |
Some responses do not include rate-limit headers. Missing headers do not mean the caller has unlimited capacity.
Handle a 429
An App API rate-limit rejection returns 429 Too Many Requests. Its JSON body names the bucket in resource and repeats the Retry-After delay in retryAfter. For example:
{
"_tag": "RateLimitExceededError",
"resource": "session",
"retryAfter": 12
}- Wait at least
Retry-Afterseconds, or useretryAfterif your client cannot read the header. If neither is available, use bounded exponential backoff. - Spread retries with jitter and slow down workers sharing that bucket. Other callers may spend capacity while you wait, so a retry is not guaranteed to succeed.
- Respect your retry limit or deadline. If the daily window runs out, defer work instead of repeatedly retrying.
If a connection drops or a write returns a 5xx instead of a typed rate-limit rejection, check the result before retrying.