Introduction
CodeGate is a hosted AI API gateway. It gives you one endpoint, one key, and one bill for Claude and GPT models, at roughly a tenth of the price of going direct to Anthropic.
What CodeGate is
- A single HTTPS endpoint at
https://codegate.dev. - Two request protocols behind it: OpenAI-compatible (
/v1/chat/completions,/v1/responses) and Anthropic-compatible (/v1/messages). - Automatic failover across upstream providers, so a hiccup at any one vendor does not take your app down.
- Prepaid credit billing per key, with per-request cost visibility.
What CodeGate is not
- Not a hosted foundation model. We route to real upstream providers.
- Not a self-hosted product for end users. The backing code (new-api) is open source, but
docs.codegate.devdocuments the hosted service atcodegate.dev. - Not a data-training operation. We do not train on your prompts. See the FAQ.
Who it is for
- Teams that want Claude Opus and Sonnet quality at a fraction of the list price.
- Individual developers using Claude Code, Codex, or opencode, who would rather pay per token through one account than juggle two provider bills.
- Products that need protocol-agnostic access to frontier models without writing two SDKs.
What you get
- Same models, 85% less. List Anthropic pricing minus 85%. See the exact per-token numbers on the Models and Pricing page.
- One key, two protocols. Generate an
sk-...key at Console, API Keys and it works for both OpenAI and Anthropic shapes. - Zero data retention. Prompts and completions pass through memory only. We keep anonymized billing metadata and nothing else.
- Multi-provider failover. If an upstream returns 5xx, we retry against a healthy alternate before returning to you.
What is coming
- Gemini. Planned. Not currently routable.
- Image generation. Coming soon. Endpoint will be
POST /v1/images/generations.
How it compares to going direct
Going direct to Anthropic means their SDK, their key, their pricing, and no way to fall back if their API returns errors. Going through CodeGate keeps the same request shape (we pass through the Messages protocol) while adding failover and the discount. The one thing you give up is direct billing with Anthropic. You pay CodeGate instead, in prepaid credits.
Next
- Quickstart: create a key and send your first request in five minutes.
- Claude Code: the full walkthrough for the most common client.