Limites de débit

Une limite de débit sur cette API est un plafond par compartiment dans une fenêtre fixe : le limiteur compte une requête dans le processus API, laisse passer les premières et refuse la suivante avec 429 rate_limit_exceeded. Le tableau ci-dessous est généré à partir du même objet que celui lu par le limiteur, donc chaque nombre ici est une limite appliquée et non le résumé d'une intention.

Compartiment Limite Fenêtre Compté
key_chat
appels d'inférence effectués avec une clé API
600 1 min par clé API
org_chat
appels d'inférence pour l'ensemble d'une organisation
1800 1 min par organisation
platform
appels à l'API de plateforme : organisation, clés, utilisation, traces, politiques
300 1 min par clé API
public_chat
appels anonymes au playground
20 1 h par adresse IP
public_page
requêtes vers des pages publiques
300 1 h par adresse IP — not enforced
public_card_request
requêtes de fiche de modèle envoyées depuis le formulaire public
5 1 h par adresse IP
auth
tentatives de connexion, d'inscription, de récupération et de réinitialisation de mot de passe
20 15 min par adresse IP

A row marked as not enforced is defined in the limiter table but no request path checks it on this deployment. It is listed so the absence is visible rather than silent: a number in the documentation is not an applied limit.

Concurrence

Au plus 8 requêtes peuvent être en cours sur une clé API à la fois, comptées par clé et non par organisation. Une requête au-delà est refusée immédiatement avec le même 429 — il n'y a pas de file d'attente.

À quoi ressemble un refus

Une requête refusée est HTTP 429 avec type rate_limit_error et code rate_limit_exceeded. Ce déploiement ne définit ni retry-after ni en-têtes de réponse x-ratelimit-*, donc le corps est la seule horloge : lorsque le limiteur connaît la fin de fenêtre, le message se termine par celle-ci au format ISO 8601 (Retry after 2026-10-06T12:00:00.000Z) ; le message par organisation n'indique aucun moment. Attendez cet instant ou appliquez un backoff exponentiel — réessayer plus tôt ne peut pas réussir, car le compteur n'avance que lorsque la fenêtre tourne. Considérez un 429 comme réessayable ; toute autre erreur dans cette documentation nécessite que la requête change avant de pouvoir réussir.

Où réside le compteur

Les fenêtres sont comptées dans le processus API et réécrites dans la table rate_limits toutes les 15 secondes et à l'arrêt, donc un redémarrage continue la fenêtre au lieu de distribuer un nouveau budget. Le plafond qui en découle est énoncé plutôt que découvert : le compteur est par nœud API, donc deux nœuds doublent chaque limite effective. REDIS_URL est réservé à la version partagée et rien ne le lit encore — exécutez un seul nœud API, ou acceptez des limites par nœud.

Questions fréquentes

What is a rate limit on this API?

A ceiling per bucket inside a fixed window. The limiter counts a request in the API process, lets the first 600 through inside a 1 min window on one API key, and refuses the next one with 429 rate_limit_exceeded. The window starts at the first request after the previous window ended, and every number in the table above is read from the object the limiter itself reads.

Which limit counts my chat calls — the key or the organization?

Both, and both have to pass. key_chat counts 600 inference calls per API key in 1 min, org_chat counts 1800 across the whole organization in the same window. A call that reaches either ceiling is refused, and the message says which one: the per-key message carries the window reset instant, the per-organization message does not.

Do I have to read the message to find out when to retry?

For a limit counted per key or per IP address, yes. This deployment sets no Retry-After header, so the reset instant inside the message text — an ISO 8601 timestamp taken from the limiter's own window end — is the only clock the response carries. For the per-organization limit the message names no time at all, so back off exponentially there. A retry before the window rolls cannot succeed: the counter only moves when the window does.

Is the counter shared across API nodes, or per process?

Per API process. Windows live in memory and are written back to the rate_limits table every 15 seconds and on shutdown, then restored on boot, so a restart continues a window instead of handing out a fresh budget. Two API nodes therefore double every effective limit. REDIS_URL is reserved for the shared version and nothing reads it yet, so run one API node or accept per-node limits.

Are all of these limits actually applied?

No. public_page is defined in the limiter table but no request path checks it on this deployment, and the table above marks it as not enforced for that reason. Every other row is named at a limiter call site, which is what applied means on this page.

How many requests may be in flight at once on one key?

8 at most. The count is kept per API key, raised when a call enters the chat handler and lowered when it finishes, and a request above the cap is refused at once with the same 429 rate_limit_exceeded — there is no queue behind it.