Short answers to common API questions. If yours isn't here — check the API reference or error codes.
Yes. Change base_url to https://api.cheapai.io/v1 and the key to cai-... — leave the rest of the code alone. Endpoints, parameters and response format are the same. Provider-specific parameters are passed to the model as-is; if a specific model doesn't support something — it returns the same error it would directly.
The catalog spans many models — OpenAI, Anthropic, Google, DeepSeek and more. The popular ones with prices are listed on the catalog page; the model name from the catalog goes into the model field. The list and prices can change — check the catalog for the source of truth.
Yes — "stream": true, response comes in chunks as SSE, stream ends with data: [DONE]. Example in the reference.
That depends on the model, not on the gateway: a request with tools / tool_choice or with images in content is forwarded to the provider, and the model responds in its own format. Model capabilities are visible from the tags in the catalog (chat, vision, embeddings, etc.).
Yes. The key is not bound to a model or provider — one key can call gpt-4o or claude-3-5-sonnet equally. Balance is shared across the account; you can have multiple keys (convenient per project) and revoke them individually — see API keys.
No. Requests go to api.cheapai.io — models respond through the gateway. This works for the API and for CLI agents like Claude Code and Codex.
Each model has its own requests-per-minute limit. On exceeding it you get 429 — retry with exponential backoff (official SDKs do this automatically). Details — Error codes.
From the tokens in the usage field of the response and the model tariff (input and output separately). No subscription — you only pay for what you use. Tariffs and formula — on the Pricing page; the cost per request is in your usage history.
First — the HTTP status and the field in the response body: that's where the specific reason lives. Decoding the statuses and what to do with each — on the page.
error.messageThe gateway uses the API key only for authentication and token accounting. How request data is handled — described in the Privacy Policy.
Next: OpenAI-compatible API · Error codes · API keys.