HTTP status codes
A status code narrows the search area; the response body and platform logs provide the actual context.
| Status | Common direction | What to check |
|---|---|---|
| 400 | Invalid or unsupported request | Payload, fields, model capabilities |
| 401 | Authentication | API key and auth header |
| 403 | Authorization or policy | Key state, model, IP, group, routing |
| 404 | Path mismatch | Base URL, /v1, automatic path appending |
| 408 / timeout | Network or processing delay | Connection, first byte, overall timeout |
| 413 | Request too large | Input, attachment, upload size |
| 429 | Rate or quota | Concurrency, key/account quota, upstream throttling |
| 5xx | Platform or upstream issue | Logs and bounded retry |
400
Reduce the request to the smallest valid payload. Add advanced options back one at a time.
401
Use GET /v1/models as a minimal credential test.
403
The key may exist but be blocked by policy. Review model restrictions, IP, group, and routing.
404
Inspect the final HTTP URL sent by the client.
413
The service includes request-size protection. Large images, audio, Base64 data, or oversized context may exceed the accepted request size.
429
429 can involve more than request speed. Inspect quota, model limits, and upstream throttling before retrying.
5xx
Use bounded backoff for temporary failures. Avoid unlimited replay of potentially billable generation requests.