Όρια ρυθμού
Ένα όριο ρυθμού σε αυτό το API είναι ένα ανώτατο όριο ανά κάδο μέσα σε ένα σταθερό παράθυρο: ο περιοριστής μετράει ένα αίτημα στη διεργασία του API, αφήνει τα πρώτα να περάσουν και απορρίπτει το επόμενο με 429 rate_limit_exceeded. Ο παρακάτω πίνακας αποδίδεται από το ίδιο αντικείμενο που διαβάζει ο περιοριστής, οπότε κάθε αριθμός εδώ είναι ένα εφαρμοσμένο όριο και όχι μια σύνοψη μιας πρόθεσης.
| Κάδος | Όριο | Παράθυρο | Μετράται |
|---|---|---|---|
| key_chat κλήσεις συμπερασμού που γίνονται με ένα κλειδί API |
600 | 1 min | ανά κλειδί API |
| org_chat κλήσεις συμπερασμού σε ολόκληρο τον οργανισμό |
1800 | 1 min | ανά οργανισμό |
| platform κλήσεις API πλατφόρμας: οργανισμός, κλειδιά, χρήση, ίχνη, πολιτικές |
300 | 1 min | ανά κλειδί API |
| public_chat ανώνυμες κλήσεις playground |
20 | 1 h | ανά διεύθυνση IP |
| public_page αιτήματα δημόσιας σελίδας |
300 | 1 h | ανά διεύθυνση IP — not enforced |
| public_card_request αιτήματα κάρτας μοντέλου που αποστέλλονται από τη δημόσια φόρμα |
5 | 1 h | ανά διεύθυνση IP |
| auth προσπάθειες σύνδεσης, εγγραφής, ανάκτησης και επαναφοράς κωδικού πρόσβασης |
20 | 15 min | ανά διεύθυνση 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.
Ταυτοχρονισμός
Το πολύ 8 αιτήματα μπορούν να είναι σε εξέλιξη σε ένα κλειδί API τη φορά, μετρούμενα ανά κλειδί και όχι ανά οργανισμό. Ένα αίτημα πάνω από αυτό απορρίπτεται αμέσως με το ίδιο 429 — δεν υπάρχει ουρά αναμονής.
Πώς μοιάζει μια απόρριψη
Ένα απορριφθέν αίτημα είναι HTTP 429 με τύπο rate_limit_error και κωδικό rate_limit_exceeded. Αυτή η ανάπτυξη δεν ορίζει retry-after ούτε κεφαλίδες απόκρισης x-ratelimit-*, επομένως το σώμα είναι το μόνο ρολόι: όπου ο περιοριστής γνωρίζει το τέλος του παραθύρου, το μήνυμα τελειώνει με αυτό σε ISO 8601 (Retry after 2026-10-06T12:00:00.000Z)· το μήνυμα ανά οργανισμό δεν αναφέρει καθόλου χρόνο. Περιμένετε αυτή τη στιγμή ή κάντε εκθετική υποχώρηση — η επανάληψη νωρίτερα δεν μπορεί να πετύχει, επειδή ο μετρητής κινείται μόνο όταν κυλήσει το παράθυρο. Αντιμετωπίστε το 429 ως επαναλήψιμο· κάθε άλλο σφάλμα σε αυτή την τεκμηρίωση απαιτεί αλλαγή του αιτήματος για να πετύχει.
Πού ζει ο μετρητής
Τα παράθυρα μετρώνται στη διεργασία του API και εγγράφονται πίσω στον πίνακα rate_limits κάθε 15 δευτερόλεπτα και κατά τον τερματισμό, επομένως μια επανεκκίνηση συνεχίζει το παράθυρο αντί να παραχωρήσει νέο προϋπολογισμό. Το ανώτατο όριο που προκύπτει δηλώνεται αντί να ανακαλύπτεται: ο μετρητής είναι ανά κόμβο API, οπότε δύο κόμβοι διπλασιάζουν κάθε πραγματικό όριο. Το REDIS_URL προορίζεται για την κοινόχρηστη έκδοση και τίποτα δεν το διαβάζει ακόμα — εκτελέστε έναν κόμβο API ή αποδεχτείτε όρια ανά κόμβο.
Συχνές ερωτήσεις
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.