Ograničenja brzine
Ograničenje brzine na ovom API-ju je gornja granica po grupi unutar fiksnog prozora: limitator broji zahtjev u API procesu, propušta prve, a odbija sljedeći s 429 rate_limit_exceeded. Tablica u nastavku prikazuje se iz istog objekta koji čita limitator, pa je svaki broj ovdje primijenjeno ograničenje, a ne sažetak namjere.
| Grupa | Ograničenje | Prozor | Broji se |
|---|---|---|---|
| key_chat pozivi inferencije s jednim API ključem |
600 | 1 min | po API ključu |
| org_chat pozivi inferencije u cijeloj organizaciji |
1800 | 1 min | po organizaciji |
| platform pozivi platformskog API-ja: organizacija, ključevi, upotreba, tragovi, pravila |
300 | 1 min | po API ključu |
| public_chat anonimni pozivi igrališta |
20 | 1 h | po IP adresi |
| public_page zahtjevi javnih stranica |
300 | 1 h | po IP adresi — not enforced |
| public_card_request zahtjevi za karticu modela poslani iz javnog obrasca |
5 | 1 h | po IP adresi |
| auth pokušaji prijave, registracije, oporavka i resetiranja lozinke |
20 | 15 min | po IP adresi |
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.
Istovremenost
Najviše 8 zahtjeva može biti u tijeku na jednom API ključu istovremeno, računajući po ključu, a ne po organizaciji. Zahtjev iznad toga odbija se odmah s istim 429 — nema reda čekanja.
Kako izgleda odbijanje
Odbijen zahtjev je HTTP 429 s tipom rate_limit_error i kodom rate_limit_exceeded. Ova implementacija ne postavlja retry-after niti x-ratelimit-* zaglavlja odgovora, pa je tijelo jedini pokazatelj vremena: gdje limitator zna kraj prozora, poruka završava s tim u ISO 8601 (Retry after 2026-10-06T12:00:00.000Z); poruka po organizaciji ne navodi nikakvo vrijeme. Pričekajte taj trenutak ili primijenite eksponencijalno odgađanje — ponovni pokušaj prije toga ne može uspjeti, jer se brojač pomiče samo kad se prozor pomakne. Tretirajte 429 kao ponovljiv; svaka druga pogreška u ovoj dokumentaciji zahtijeva promjenu zahtjeva prije nego što može uspjeti.
Gdje se nalazi brojač
Prozori se broje u API procesu i zapisuju natrag u tablicu rate_limits svakih 15 sekundi i pri isključivanju, pa restart nastavlja prozor umjesto da dodjeljuje novi proračun. Gornja granica koja iz toga slijedi je navedena, a ne otkrivena: brojač je po API čvoru, pa dva čvora udvostručuju svako efektivno ograničenje. REDIS_URL je rezerviran za dijeljenu verziju i još ga ništa ne čita — pokrenite jedan API čvor ili prihvatite ograničenja po čvoru.
Često postavljana pitanja
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.