# Code By AI > Code By AI is a unified AI coding platform that routes requests to Claude Code, > OpenAI Codex and Gemini models through one gateway. One API key serves four > wire protocols — Anthropic Messages, OpenAI Responses, OpenAI Chat Completions > and Gemini — at roughly one sixth of the official API price, on one bill. Each > protocol carries its own model family; the gateway forwards protocols rather > than translating between them. - Website: https://www.codebyai.net - Documentation: https://www.codebyai.net/docs - Model pricing: https://www.codebyai.net/docs/model-price - Model catalog: https://www.codebyai.net/models - Pricing comparison: https://www.codebyai.net/pricing - API model list endpoint: https://www.codebyai.net/v1/models - Codex endpoint: https://www.codebyai.net/api/agent (wire_api = "responses") - Languages: English, Traditional Chinese, French, Korean, Japanese ## What Code By AI provides - One API key for Claude Code, Codex and Gemini — no separate vendor accounts. - Desktop agents, IDEs and editor extensions work through the same key: ZCode, Qoder, WorkBuddy, Trae, CodeBuddy, Cline and Qwen Code accept the Code By AI base URL in their custom provider settings. - One-command setup for Claude Code, Codex, Gemini CLI, OpenCode, Pi, Qwen Code, ZCode, WorkBuddy and CodeBuddy: https://www.codebyai.net/setup.sh (Qoder, Trae and Cline are configured in the app; each has a guide under https://www.codebyai.net/docs/agents). - Token pricing from 1/6 of official list prices, before per-channel discounts. - Drop-in compatibility: point the official CLI/SDK at the Code By AI base URL and keep using the same model names. - Usage and billing dashboards with per-model token accounting. ## Documentation - Claude Code Configuration: https://www.codebyai.net/docs/agents/claudecode - Codex Configuration: https://www.codebyai.net/docs/agents/codex - Gemini Configuration: https://www.codebyai.net/docs/agents/gemini - OpenCode Configuration: https://www.codebyai.net/docs/agents/opencode - Pi Configuration: https://www.codebyai.net/docs/agents/pi - ZCode Custom Models: Claude & GPT: https://www.codebyai.net/docs/agents/zcode - Qoder Custom Models: Claude & GPT: https://www.codebyai.net/docs/agents/qoder - WorkBuddy Custom Models: Claude & GPT: https://www.codebyai.net/docs/agents/workbuddy - Cline: Claude & GPT via OpenAI-Compatible: https://www.codebyai.net/docs/agents/cline - Trae Custom Models: Claude & GPT: https://www.codebyai.net/docs/agents/trae - Qwen Code: Claude & GPT via OpenAI-Compatible: https://www.codebyai.net/docs/agents/qwen-code - CodeBuddy Custom Models: Claude & GPT: https://www.codebyai.net/docs/agents/codebuddy - Claude Code Environment Variables: https://www.codebyai.net/docs/agents/environment-variables - Top Up & Balance: https://www.codebyai.net/docs/billing/topup - Volume Discount: https://www.codebyai.net/docs/billing/volume-discount - Install Claude Code, Codex & Gemini CLI: https://www.codebyai.net/docs/getting-started/installation - Configuration & Top Up: https://www.codebyai.net/docs/getting-started/configuration - API Usage Overview: https://www.codebyai.net/docs/getting-started/apiusage - Troubleshooting Common Errors: https://www.codebyai.net/docs/troubleshooting/common-errors ## Supported models and prices All prices are USD per 1 million tokens and already include the Code By AI discount. Official list prices are shown struck through on the pricing page. ### Codex - gpt-5.6-sol: $0.53 input / $0.05 cached input / $2.67 output — per 1M tokens USD - gpt-5.6-terra (default): $0.33 input / $0.03 cached input / $2.00 output — per 1M tokens USD - gpt-6-astra: $1.33 input / $0.13 cached input / $6.67 output — per 1M tokens USD - gpt-6-sol: $0.27 input / $0.03 cached input / $1.33 output — per 1M tokens USD - gpt-6.1-sol: $0.27 input / $0.01 cached input / $1.33 output — per 1M tokens USD - gpt-6.1-terra: $0.13 input / $0.0067 cached input / $0.67 output — per 1M tokens USD ### Gemini - gemini-3.1-pro-preview: $0.20 input / $0.02 cached input / $1.20 output — per 1M tokens USD - gemini-3.7-flash: $0.10 input / $0.01 cached input / $0.30 output — per 1M tokens USD - gemini-3.8-flash (default): $0.08 input / $0.0075 cached input / $0.38 output — per 1M tokens USD - gemini-4-argon: $0.20 input / $0.01 cached input / $1.00 output — per 1M tokens USD ### Claude Code - claude-fable-5: $2.00 input / $0.20 cached input / $10.00 output — per 1M tokens USD - claude-fable-5-1: $2.00 input / $0.05 cached input / $10.00 output — per 1M tokens USD - claude-haiku-4-5-20251001: $0.13 input / $0.01 cached input / $0.67 output — per 1M tokens USD - claude-opus-4-6: $0.67 input / $0.07 cached input / $3.33 output — per 1M tokens USD - claude-opus-4-7: $0.67 input / $0.07 cached input / $3.33 output — per 1M tokens USD - claude-opus-4-8: $0.67 input / $0.07 cached input / $3.33 output — per 1M tokens USD - claude-opus-5: $0.67 input / $0.07 cached input / $3.33 output — per 1M tokens USD - claude-opus-5-5: $0.53 input / $0.03 cached input / $2.67 output — per 1M tokens USD - claude-sonnet-4-6: $0.40 input / $0.04 cached input / $2.00 output — per 1M tokens USD - claude-sonnet-5 (default): $0.27 input / $0.03 cached input / $1.33 output — per 1M tokens USD - claude-sonnet-5-5: $0.27 input / $0.01 cached input / $1.33 output — per 1M tokens USD ## Common questions - Which model is the default? Codex → gpt-5.6-terra; Claude Code → claude-sonnet-5; Gemini → gemini-3.8-flash. Requests that omit `model` fall back to that channel's default. - How is billing calculated? Per token, per model, using the prices above. - Which endpoints does the gateway accept? `POST https://www.codebyai.net/api/agent/v1/messages` (Anthropic); `POST https://www.codebyai.net/api/agent/v1/responses` (OpenAI); `POST https://www.codebyai.net/api/agent/v1/chat/completions` (OpenAI); `POST https://www.codebyai.net/api/agent/v1beta/models/{model}:generateContent` (Google). The two OpenAI-format paths accept both the GPT and the Claude family — a `claude-*` model sent there is forwarded to the Claude channel and billed at Claude prices — while the Anthropic-format path serves the Claude family only. A model belonging to neither family (for example `gemini-*`) is rejected with a 400. - Is there an OpenAI-compatible endpoint? Yes — both `/v1/responses` and `/v1/chat/completions` are served, and `/v1/models` lists the whole catalog. Both the GPT and Claude families are callable through it, so any OpenAI SDK can talk to Claude models without an Anthropic client.