Errors and limits
Errors come back as JSON, with a status code and a message you can show.
JSON
Status codes
| Status | Code | What to do |
|---|---|---|
| 400 | invalid_request | Fix the request. The message says what is wrong. |
| 401 | unauthorized | Check your key. It may be revoked. |
| 402 | insufficient_balance | Your balance does not cover the text. Add credit. |
| 429 | rate_limited | Wait for the seconds in Retry-After, then retry. |
| 503 | unavailable | The queue is full or the model server is down. Wait for Retry-After, then retry. |
You are charged when the render finishes. A failed render is never charged, so retrying after an error costs nothing extra.
Limits
| Limit | Value |
|---|---|
| Input | 2,000 characters a request |
| Concurrency | 2 requests at once per key, and 2 per account |
| Rate | 60 requests a minute per key |
| Keys | 10 active keys per account |
| Queue | Bounded across all accounts. When it is full, requests answer 503. |