Rate limits
Organization limits, admission headers and respectful retries.
Live system status and incident history →
RPM, TPM, RPD and concurrency
Limits apply to each organization and model across all keys and gateway processes. RPM is requests per minute, TPM tokens per minute, RPD requests per day, and concurrency counts in-flight requests. Minute windows align to UTC minutes; daily windows align to UTC days. These are fixed windows.
Effective policy precedence is organization model override, organization wildcard, tier model policy, then tier wildcard. Signed-in GET /api/v1/limits is the source for your organization. Admission reserves a conservative UTF-8 input bound plus requested output; TPM settles to observed usage. A short prompt can still require a larger admission allowance.
Response headers
Headers describe the admission snapshot. Before successful authentication or admission their counters are zero; reset headers default to 60s. There are no separate RPD or concurrency response headers.
| Header | Meaning |
|---|---|
| x-ratelimit-limit-requests | RPM ceiling |
| x-ratelimit-remaining-requests | Remaining requests in the current minute |
| x-ratelimit-limit-tokens | TPM ceiling |
| x-ratelimit-remaining-tokens | Tokens remaining after reservation |
| x-ratelimit-reset-requests / x-ratelimit-reset-tokens | Seconds until minute reset, expressed like 42s |
| retry-after | On 429, delay in seconds; daily exhaustion can wait until UTC day reset |
| x-request-id | Server-issued identifier; user-supplied request IDs are not accepted |
Bounded backoff with jitter
This JavaScript example retries only 429, honors retry-after and stops after five attempts. It is a non-streaming example; never automatically replay a partially consumed stream. Authentication failures are separately limited to 20 per IP per UTC minute, after which attempts return 429.
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
for (let attempt = 0; attempt < 5; attempt++) {
const response = await fetch("https://api.xoomcloud.si/v1/chat/completions", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.XOOMCLOUD_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({"model":"meta-llama/Llama-3.3-70B-Instruct","messages":[{"role":"user","content":"Hello, XoomCloud!"}],"max_tokens":64}),
});
if (response.status !== 429 || attempt === 4) {
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
break;
}
const retryAfter = Number(response.headers.get('retry-after'));
const delay = Math.max(retryAfter * 1000 || 0, 500 * 2 ** attempt);
await response.body?.cancel();
await sleep(delay + Math.random() * 250);
}