llms.txt
Compare with other sites' llms.txt files →# 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 1/10 to 1/5 of the official API price, depending on the model, on one prepaid balance. 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 (requires an API key; the public list is https://www.codebyai.net/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 prices are a fixed fraction of the vendor list price, set per model: 1/10 for gemini-3.1-pro-preview, gemini-3.7-flash, gemini-3.8-flash, gemini-4-argon; 1/7.5 for claude-haiku-4-5-20251001, claude-opus-4-6, claude-opus-4-7, claude-opus-4-8, claude-opus-5, claude-opus-5-5, claude-sonnet-4-6, claude-sonnet-5, claude-sonnet-5-5, gpt-5.6-sol, gpt-5.6-terra, gpt-6-astra, gpt-6-sol, gpt-6.1-sol, gpt-6.1-terra; 1/5 for claude-fable-5, claude-fable-5-1.
- Prepaid, pay-as-you-go: top up a balance, each request is debited per token. No subscription.
- 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 GPT & Claude: Custom Model Setup: 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 Models & API Key: Claude and 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
- API Quickstart: https://www.codebyai.net/docs/getting-started/api-quickstart
- 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` are answered by that channel's default. A named model id that is not in the catalog is rejected with HTTP 400 on `/v1/messages`, `/v1/responses`, `/v1/chat/completions` and the Gemini generateContent paths, whether the prefix is unknown (`abc123`) or the prefix is known but the version is not (`claude-sonnet-99`). The request is not answered by a default model. Case differences are accepted. On the JSON `model` field of Messages, Responses and Chat Completions, a single `anthropic/`, `openai/`, `google/` or `models/` prefix is accepted only when the remainder is an exact catalog id. The Gemini URL is one path segment, so `google/` and `models/` prefixes there are a 404; use the catalog id itself. Check exact IDs at https://www.codebyai.net/models.
- 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 catalogued `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. An id that is not in the catalog is rejected with HTTP 400 on every one of these endpoints and is not answered by a default model.
- Where do the models come from? Code By AI does not host models. Requests are forwarded to third-party model provider channels for Claude, GPT and Gemini; that is how the token prices above are possible.
- How reliable is it? No measured success rate is published, and there is no public status page. A request that fails before the model returns a result is not charged.
- 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.