CostIQDocs

Operate

Limits and errors

Design clients that respect their assigned capacity, expose failures clearly, and never turn a retry into duplicate work.

Your limits

A CostIQ key may carry its own request-per-minute, token-per-minute, concurrency, expiry, model, and estimated-spend controls. Use the limits supplied with your key; they can be lower than organization capacity.

RPM

Requests admitted during the configured window.

TPM

Combined input and output tokens during the configured window.

Concurrency

In-flight requests, including streams that have not ended.

Budget

Estimated USD usage policy, not an invoice or card balance.

HTTP errors

400Invalid input

Malformed JSON, an unsupported policy field, or another invalid request.

401Authentication failed

The key is missing, invalid, expired, or revoked.

403Access denied

The model, route, or edge request is not allowed.

404Route unavailable

The requested application route does not exist.

413Request too large

The request exceeds the 2 MiB body limit.

429Limit reached

A request, token, concurrency, budget, or authentication-attempt limit was reached.

502 / 503Service unavailable

The inference upstream or authentication service could not complete the request.

Retry safely

  1. Respect Retry-After whenever it is present.
  2. Use capped exponential backoff with jitter for transient 429, 502, and 503 responses.
  3. Do not retry 400, 401, or 403 without correcting the request or credential.
  4. Do not blindly retry tool calls or other work that may have side effects.

Request constraints

  • Request bodies must be JSON and no larger than 2 MiB.
  • Only GET /v1/models and POST /v1/chat/completions are public.
  • Query strings and customer-controlled routing or metadata fields are rejected.
  • Use only model aliases returned for your key.