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.

BucketExamplesPer minutePer day
readList sessions, open an event stream60050,000
writeSubmit a prompt, send a session message, create a thread30020,000
sessionCreate a session, archive a thread20200

The session bucket has higher plan defaults. Organization overrides can replace either window’s limit.

PlanPer minutePer day
Pro or Max601,000
Ultra1205,000
Team24010,000
Enterprise60050,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.

HeaderMeaning
X-RateLimit-LimitMaximum requests in the reported window.
X-RateLimit-RemainingRequests left in that window as of this check.
X-RateLimit-ResetWhen that window resets, as Unix epoch seconds.
Retry-AfterOn 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
}
  1. Wait at least Retry-After seconds, or use retryAfter if your client cannot read the header. If neither is available, use bounded exponential backoff.
  2. 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.
  3. 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.