Limits and errors

Limits and errors

Errors use the OpenAI format, {"error": {"message", "type", "code"}}, with the status codes below.

One request at a time

Each account runs one request at a time. A second request waits up to 5 seconds for the first to finish, then returns 429 concurrent_request_limit. If your tool sends requests in parallel, for example with subagents, limit it to one at a time.

Status codes

StatusCodeMeaning
400model_requiredThe request has no model, or its body is not valid JSON.
401invalid_api_keyThe API key is missing, wrong, or revoked.
402insufficient_creditsYour balance is too low. Top up and retry.
404model_not_foundThe model id is not one of the active models.
413request_too_largeThe request body is over 8 MiB.
429concurrent_request_limitAnother request from your account is still running.
429rate_limited, rate_limit_exceededToo many requests. Wait for the Retry-After header, then retry.
503under_capacityThe model is temporarily unavailable. Retry shortly.

Retrying

Retry 429 after the Retry-After header and 503 after a short wait, with backoff. Don't retry 400, 401, 402, or 404; fix the request or the account first.