Guides
How to call Claude, GPT, Gemini and Grok through one OpenAI-compatible endpoint: setup, streaming, caching, rate limits and what each model costs.
- API error codes: what each one means401 through 503, which of them are worth retrying, and how to tell a gateway error from one the upstream produced.
- Choosing among the 12 Claude model idsFour questions in order — lane, context, price, capability — reduce twelve Claude ids to a shortlist. Billed rates run from $0.30 to $4.00 per million input.
- Choosing a coding model: a filter, not a ranking27 text models across four lineups, from $0.050 to $4.00 per million input tokens. Four constraints narrow that to a shortlist you can test in an afternoon.
- Choosing a Gemini model: five ids on one price ladderEvery Gemini id here takes 1,000,000 tokens, lists the same capabilities and uses the same route. Prices run from $0.050 to $0.20 per million input — a 4x spread with nothing else changing.
- Choosing a Grok model: all six ids comparedThree text ids, two image ids and one video id, on three different routes, all at the same 0.2x multiplier. What separates them and which decision each one belongs to.
- Choosing among the eight OpenAI idsTwo of the eight are ruled out by route or modality before price enters. The remaining six split on context, output ceiling and a per-token rate spanning 8.33×. The order to decide in.
- The Claude 1M-token context window: what it is good forNine of twelve Claude ids here carry a 1,000,000-token context. What that buys, what it costs per full window, and where a smaller window is not the constraint.
- Claude extended thinking: when it earns its tokensEleven of the twelve Claude ids support thinking. A budget is spent on generated tokens and capped by the model output ceiling, so the output rate is the number that decides it.
- Estimating a bill before you run the jobConsumer price is the official per-token rate times the model's multiplier. Two families break that rule: images billed per picture and video billed per second.
- GPT 6 Astra Stable: 1,050,000 tokens, on an Anthropic-shaped routeThe largest context in the catalog at 1,050,000 tokens, billed at 0.2× on a $10 / $50 list rate — and the one OpenAI id that answers on /v1/messages instead of /v1/responses.
- GPT Image 2 through this gateway: calling it and pricing itgpt-image-2 is 0.1× — $0.50 per million input tokens and $3.00 per million output. It is the one image id billed on tokens, so cost moves with size and quality.
- Grok's 500K context window against the 1M-token modelsgrok-4.6 and grok-4.5 take 500,000 tokens; Claude Sonnet 5 and the Gemini Flash line take 1,000,000. When the extra half matters, what it costs, and why a bigger window is not a better answer.
- Grok Imagine Video 1.5: generating clips billed by the secondgrok-imagine-video-1.5 is 0.2× and charged per generated second, not per token. An 8-second 720p clip is $0.224. The call is asynchronous: create, poll, download.
- Model pricing explained: how the multiplier produces your billYour price is the official per-token rate times that model’s multiplier. Multipliers run from 0.1× to 0.5×, so the multiplier alone never tells you which model is cheaper.
- OpenAI-compatible API setup: your first requestOne base URL, one key, three request shapes. Which endpoint a model answers on is a property of the model, not a setting you choose.
- The /v1/responses route: what it is and which ids use itSix of the eight OpenAI ids here answer on POST /v1/responses with a Bearer token. Two do not. Here is how the route is decided, and what it means for switching models.
- Prompt caching: cutting cost on a repeated prefixCache reads and cache writes are their own billing buckets with their own rates. Which means the saving is real, and so is the write you paid for.
- Rate limits and quotas: how throughput is bounded hereNo requests-per-minute tier and no tokens-per-minute ceiling. What bounds you instead is balance, per-key quota, and concurrency on two model ids.
- Stable lanes explained: what stable-* buys and what it costsA stable-* id is a dedicated lane to the same upstream model, served on our own key instead of the shared pool. Four times the multiplier on Claude, and no pool failover.
- Streaming responses across the three route shapesstream: true on all three, each in its own event format. What the proxy does before the first byte, and why aborting does not make a request free.
- Switching from Anthropic direct: migrating the SDK/v1/messages, x-api-key, anthropic-version — all unchanged. What differs is the model ids, and one rule about retired ones.
- Switching from OpenAI direct: migrating an existing integrationBase URL, key, model id. What carries over unchanged, what needs a second look, and how to verify the swap actually took.