BUILD WITH INFERMAX
Errors & limits
Build clients that handle validation, permissions, rate limits, and ambiguous outcomes deliberately.
Read the error code
API errors use an error object with a code. Capture the X-Request-Id response header when reporting a failure. Other fields can vary by operation; do not assume every error includes retry or dispatch metadata.
{
"error": {
"code": "MODEL_NOT_READY"
}
}| Status | Meaning and action |
|---|---|
| 400 / 422 | Invalid input or reference. Correct the request before retrying. |
| 401 | Missing, expired, or revoked credentials. Check your key. |
| 403 / 404 | Insufficient permission or an unavailable resource. Verify project access; some hidden resources return 404. |
| 409 | State, version, or idempotency conflict. Re-read authoritative state before another mutation. |
| 429 | Rate limit reached. Honor Retry-After when present. |
| 503 | Service or model unavailable. Inspect the error code and readiness before retrying. |
Limits are scoped and deployment dependent
Use model health and the inference limits endpoint to inspect readiness. Use compute limits before reserving capacity. Schema maxima describe validation bounds; they are not guaranteed model context, throughput, quota, or an SLA.
The API bounds input sizes, concurrency, and deadlines. Inspect operation-specific constraints in the reference. For list APIs that expose limit and after, follow the documented cursor shape. Do not treat a UUID cursor as chronological ordering.
Retry without duplicating work
Management mutations marked with Idempotency-Key require it. Reuse the key only for the same operation and body; changing the body can produce a conflict. Chat Completions accepts an optional key; an unkeyed retry is an independent attempt.
After an ambiguous timeout, inspect request or operation state before retrying. 202 means the request was accepted, not that capacity is ready or cleanup has completed. Capacity release and provider billing termination are distinct observations.
Usage is not an invoice
SIMULATED activity does not establish live hardware execution. Unknown measurements remain unknown; they are not zero. Consumption reports and raw work units are separate from charges and settlement.