Gemini 4 Carbon API pricing and access
Run Gemini 4 Carbon (model ID gemini-4-carbon) through Code By AI for $0.20 per 1M input tokens and $1.00 per 1M output tokens. Google lists the same model at $2.00 and $10.00; you pay about 90% less than that, with no monthly subscription.
What Gemini 4 Carbon is for
Use this model through Gemini CLI to explain code, investigate error messages and summarize project changes. Review its suggestions against your project.
Official price
$2.00
per 1M tokens, USD
Your price
$0.20
per 1M tokens, USD
You save
−90%
1/10 of official price
Gemini model service may be unstable due to recent upstream risk controls. Please choose carefully.
| Official price | Your price | |
|---|---|---|
| Input | $2.00 | $0.20 |
| Cache read | $0.10 | $0.01 |
| Output | $10.00 | $1.00 |
What gemini-4-carbon costs in a typical month
For 20M input and 2M output tokens, the same workload costs $60.00 at list price and $6.00 through Code By AI — 90% less.
How to use gemini-4-carbon
Export GOOGLE_GEMINI_BASE_URL=https://www.codebyai.net/api/agent and GEMINI_API_KEY=sk-proj-xxxx, then launch the CLI, and use the model ID gemini-4-carbon. The Gemini guide walks through the full configuration.
export GOOGLE_GEMINI_BASE_URL="https://www.codebyai.net/api/agent" export GEMINI_API_KEY="sk-proj-xxxx"
No key yet? Create one
Claude Code, Codex and Gemini CLI compatibility
A client can call gemini-4-carbon only when it speaks the endpoint that serves this model. The table shows what works and the minimum configuration.
- Claude CodeNot applicable
Not applicable: the Anthropic Messages endpoint serves Claude models only.
Open the Claude Code guide - CodexNot applicable
This model is not available in Codex. Gemini models use the Gemini endpoint.
Open the Codex guide - Gemini CLIAvailable
Set GOOGLE_GEMINI_BASE_URL="https://www.codebyai.net/api/agent" and GEMINI_API_KEY, select gemini-api-key in ~/.gemini/settings.json, then use model gemini-4-carbon.
Open the Gemini CLI guide
Compare other Gemini models
Your price /1M
Similar price on other channels
Gemini 4 Carbon FAQ
Get started
Four steps to your first request
- 01
Create a free account
Sign up with Google, GitHub or email and set a password. No card is required.
- 02
Generate an API key
Create a key in one click from the dashboard. It lets your CLI authenticate with Code By AI.
- 03
Top up your balance
Add credit before your first request; usage is charged per token from your balance.
- 04
Point your CLI at Code By AI
Export one base-URL variable, or add a model provider block to config.toml. The setup guides list the exact lines for each agent.
No card required to sign up · API usage requires a top-up