Claude vs GPT vs Gemini: model and API comparison
There is no universal winner: choose by tool and workload. Compare actual token rates from the live catalog, then follow the setup guide for Claude Code, Codex, Gemini CLI, CodeBuddy or WorkBuddy.
Representative models and monthly cost
The table uses the default model for each channel and the same workload: 20M input and 2M output tokens per month. Model IDs and prices come from the live catalog.
| Channel | Model | List price / month | Code By AI / month | Saving |
|---|---|---|---|---|
| Claude Code | claude-sonnet-5 | $60.00 | $8.00 | 87% |
| Codex | gpt-5.6-terra | $80.00 | $10.67 | 87% |
| Gemini | gemini-3.8-flash | $22.50 | $2.25 | 90% |
Which family should you choose?
Choose Claude for Claude Code
Use this family when your workflow is Claude Code or the Anthropic Messages API. The CLI, model IDs and setup are built around that protocol.
Claude Code setup guideChoose GPT for Codex
Use this family for Codex and OpenAI Responses-compatible tools. Configure the model provider and the exact GPT model ID from the table.
Codex setup guideChoose Gemini for Gemini CLI
Use this family for Gemini CLI and Gemini-compatible applications. Set the Gemini endpoint and key, then select the Gemini model ID you need.
Gemini setup guideProtocols and endpoints
The gateway exposes four protocols. Protocols are not interchangeable: choose the endpoint your tool supports, then use a model ID accepted by that endpoint.
| Protocol | Endpoint | Model families | Typical tools |
|---|---|---|---|
| Anthropic Messages | https://www.codebyai.net/api/agent/v1/messages | Claude only | Claude Code and Anthropic SDK clients |
| OpenAI Responses | https://www.codebyai.net/api/agent/v1/responses | GPT and Claude | Codex and OpenAI Responses clients |
| OpenAI Chat Completions | https://www.codebyai.net/api/agent/v1/chat/completions | GPT and Claude | CodeBuddy, WorkBuddy and OpenAI-compatible clients |
| Gemini generateContent | https://www.codebyai.net/api/agent/v1beta/models/{model}:generateContent | Gemini only | Gemini CLI and Gemini-compatible applications |
Gemini does not use the Chat Completions endpoint. CodeBuddy and WorkBuddy tutorials on this page cover Claude and GPT only.
Use Claude and GPT in CodeBuddy and WorkBuddy
CodeBuddy and WorkBuddy accept OpenAI-compatible Chat Completions for Claude and GPT. Use the full endpoint https://www.codebyai.net/api/agent/v1/chat/completions, then add separate entries for a Claude model and a GPT model. Gemini uses its own generateContent endpoint, not this Chat Completions path.
Claude Code models: full price comparison
| Model | List price | You pay |
|---|---|---|
| claude-haiku-4-5-20251001 | $1.00 / $5.00 | $0.13 / $0.67 |
| claude-sonnet-5Default | $2.00 / $10.00 | $0.27 / $1.33 |
| claude-sonnet-5-5 | $2.00 / $10.00 | $0.27 / $1.33 |
| claude-sonnet-4-6 | $3.00 / $15.00 | $0.40 / $2.00 |
| claude-opus-5-5 | $4.00 / $20.00 | $0.53 / $2.67 |
| claude-opus-4-6 | $5.00 / $25.00 | $0.67 / $3.33 |
| claude-opus-4-7 | $5.00 / $25.00 | $0.67 / $3.33 |
| claude-opus-4-8 | $5.00 / $25.00 | $0.67 / $3.33 |
| claude-opus-5 | $5.00 / $25.00 | $0.67 / $3.33 |
| claude-fable-5 | $10.00 / $50.00 | $2.00 / $10.00 |
| claude-fable-5-1 | $10.00 / $50.00 | $2.00 / $10.00 |
per 1M tokens (input / output)
Codex models: full price comparison
| Model | List price | You pay |
|---|---|---|
| gpt-6.1-terra | $1.00 / $5.00 | $0.13 / $0.67 |
| gpt-6-sol | $2.00 / $10.00 | $0.27 / $1.33 |
| gpt-6.1-sol | $2.00 / $10.00 | $0.27 / $1.33 |
| gpt-5.6-terraDefault | $2.50 / $15.00 | $0.33 / $2.00 |
| gpt-5.6-sol | $4.00 / $20.00 | $0.53 / $2.67 |
| gpt-6-astra | $10.00 / $50.00 | $1.33 / $6.67 |
per 1M tokens (input / output)
Gemini models: full price comparison
| Model | List price | You pay |
|---|---|---|
| gemini-3.8-flashDefault | $0.75 / $3.75 | $0.08 / $0.38 |
| gemini-3.7-flash | $1.00 / $3.00 | $0.10 / $0.30 |
| gemini-3.1-pro-preview | $2.00 / $12.00 | $0.20 / $1.20 |
| gemini-4-argon | $2.00 / $10.00 | $0.20 / $1.00 |
per 1M tokens (input / output)
FAQ
- Is there a single best model?
- No. Choose by tool and workload. Claude Code fits Anthropic's CLI, Codex fits OpenAI's tools, and Gemini fits Google's CLI. For price, compare the exact model ID rather than the family name.
- Can I use Claude, GPT and Gemini with one key?
- Yes. One Code By AI key works across all three channels. You still configure each tool with its own protocol and model ID.
- Which model should I use in CodeBuddy or WorkBuddy?
- Use Claude or GPT, and add them as separate custom models. The Chat Completions endpoint accepts GPT and Claude IDs; Gemini IDs use a different generateContent endpoint and are not part of these two custom-model tutorials.