Billing and limits
Updated
Rate limits
The request rate limit an organization has, the headers that report it, the limit on open streams, and the separate allowances for retrieving, canceling and deleting.
Request rate limit
Section titled “Request rate limit”Each organization is limited to 60 requests per minute. That is the current
default and it may change. The live values are in the rate-limit headers on
each response, so a client can slow down before it is refused. To raise your
limit, contact support@helping.io. Refusals are
429 with code rate_limit_exceeded.
Rate-limit headers
Section titled “Rate-limit headers”Every rate-limited request carries the standard headers for the allowance
that governs it, so a client can slow down before it is refused rather than
after. They come on a successful response and on a 429; any other error
carries none. Listing models is not rate limited and carries none:
| Header | Meaning |
|---|---|
x-ratelimit-limit-requests | The request allowance |
x-ratelimit-remaining-requests | Requests left in the allowance |
x-ratelimit-reset-requests | Time until the allowance is full again, as a duration, for example 1s or 6m0s |
Where a tokens-per-minute cap applies to your key, the token family comes alongside them:
| Header | Meaning |
|---|---|
x-ratelimit-limit-tokens | The token allowance, sent only when a token cap applies |
x-ratelimit-remaining-tokens | Tokens left in the current window |
x-ratelimit-reset-tokens | Time until the token window rolls over, as a duration, for example 6m0s |
A refused request answers 429 with code rate_limit_exceeded and
Retry-After set to the seconds until the allowance refreshes. Nothing is
created and nothing is charged.
Open streams
Section titled “Open streams”Each organization can hold a limited number of streamed responses open at
once. Non-streaming requests do not count against it. A streaming request
past the limit is refused before anything starts, so nothing is created and
nothing is charged; the message states the limit, and Retry-After says when
to try again. Waiting for one of your open streams to end also frees a place.
| Status | code | Retry-After | Meaning |
|---|---|---|---|
429 | stream_limit_exceeded | Yes | You are already holding the maximum number of open streams; nothing was started, so retry once one ends. |
Retrieving, canceling and deleting
Section titled “Retrieving, canceling and deleting”Two more allowances apply per organization, separately from the ones above:
| Requests | At once | Then |
|---|---|---|
| Retrieving a response, and every Conversations API request except deletes | 300 requests | 5 requests per second |
| Deletes of responses, conversations and items, and cancels, together | 100 requests | 2 requests per second |
A request under one of these allowances reports it in the same headers: its
size as the limit, what is left, and the time until it is full again. Past
either, the answer is the same 429 with Retry-After.