Gemini 4 Carbon API: Pricing, Thinking Levels, and Migration

Start Gemini 4 Carbon at medium effort for difficult coding work. Compare introductory and December token rates, count thinking and cache costs, interpret CursorBench task costs, migrate from Argon or Gemini 3, and run native Python requests with recoverable background generation.

Contents
Gemini 4 Carbon API: Pricing, Thinking Levels, and Migration

Start Gemini 4 Carbon at thinking_level="medium" for difficult coding tasks, and keep Argon for routine interactive work. Budget at December rates before making Carbon your default: standard token prices double on December 1, 2026. Do not choose low merely to save money; CursorBench reports a higher task cost than medium.

As of November 13, 2026, Google’s Carbon documentation lists gemini-4-carbon on the paid Gemini API tier and in Google AI Studio. Carbon is not available on the Free tier. Its main tradeoff is deeper reasoning with more thinking tokens and higher per-turn latency than Argon.

What does Gemini 4 Carbon cost before and after November 30?

Use the December rates for ongoing budgets, even when your initial evaluation runs at introductory prices. The following are Google’s standard API rates in USD per 1M tokens, verified on November 13, 2026, against its pricing page.

Token categoryThrough November 30, 2026From December 1, 2026
Uncached input$2.00$4.00
Input served from implicit cache$0.10$0.20
Output, including thinking tokens$10.00$20.00

Thinking tokens are billable output even when they do not appear in the final answer. Google also counts internal tool instructions and function declarations when grounding is used. Tool charges can apply separately, so answer length alone cannot explain an agent’s bill.

For a model-token estimate, separate uncached input, cached input, and billable output. Suppose an agent job accumulates these totals across all its calls:

  • 200,000 uncached input tokens.
  • 800,000 cached input tokens.
  • 100,000 billable output tokens, including thinking.

The introductory estimate is 0.2 × $2 + 0.8 × $0.10 + 0.1 × $10 = $1.48.

The December estimate is 0.2 × $4 + 0.8 × $0.20 + 0.1 × $20 = $2.96.

These are estimated model-token charges, not an all-in invoice. They exclude tool fees, subscriptions, and taxes. The cache mix is an assumption, not an expected hit rate. Without those cache hits, the same input and output totals would cost $3.00 before December and $6.00 afterward.

Record actual usage across retries and failed attempts. A low price per token does not necessarily produce a low cost per accepted code change.

Which thinking level should you use?

Use medium first, then change effort based on a repeatable coding task. Google recommends medium for most work, including complex code and agent use cases. Its thinking-level guidance positions low for simpler tasks and high for the hardest reasoning.

The November 13, 2026 CursorBench 4.0 results show why effort labels are not spending limits:

Model and effortScoreReported cost per taskSteps
Gemini 4 Carbon High60.4%$9.2271
Gemini 4 Carbon Medium60.1%$8.4967
Gemini 4 Carbon Low58.6%$11.89124
Fable 5.2 Max60.0%$32.79218
Opus 5.5 High56.0%$3.9768
Gemini 4 Argon High52.9%$4.57118

Carbon Low cost $3.40 more per task than Medium in this evaluation. It also took 124 steps rather than 67. High gained 0.3 percentage points over Medium and cost $0.73 more.

These are Cursor’s results on its own ambiguous, multi-file tasks. They are not a forecast for your repository or a December invoice. The aggregate rows cannot establish whether cache behavior, reasoning, or another factor caused the cost difference.

Keep medium when it passes your tests. Try high when Medium misses a difficult requirement or fails a reproducible debugging task. Use low for bounded work only after confirming that extra attempts do not erase its per-turn savings.

For a comparator outside Gemini, the Fable 5.2 setup and pricing guide provides an API and Claude Code evaluation path. Compare accepted changes under the same tests rather than treating different providers’ effort names as equivalent.

Make a native Gemini API request

Use Google’s native API for the Interactions examples below. Activate a paid project through the billing setup, complete its required payment setup, and create a Gemini API key. Check Google’s supported regions before planning a direct integration.

The native REST resource is https://generativelanguage.googleapis.com/v1beta/interactions. The Python SDK handles the request and authentication.

BetterToken also lists gemini-4-carbon as of November 13, 2026. Its OpenAI-compatible base URL is https://www.bettertoken.ai/v1; check gateway prices separately. The native Interactions and background examples below are not gateway-compatibility guarantees.

In Bash, install the SDK and read your key without displaying it. Paste the key when read waits, then press Enter.

python3 -m pip install --upgrade "google-genai>=2.34.0"
read -rs GEMINI_API_KEY && export GEMINI_API_KEY

Save this as carbon_smoke.py. It asks for a small code correction without giving the model file-editing or execution tools.

import os
from google import genai

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
interaction = client.interactions.create(
    model="gemini-4-carbon",
    input=(
        "Find the bug. Return a corrected function and pytest tests for "
        "cached values 0 and False.\n\n"
        "def cached_value(cache, key, load):\n"
        "    if cache.get(key):\n"
        "        return cache[key]\n"
        "    cache[key] = load()\n"
        "    return cache[key]\n"
    ),
    generation_config={
        "thinking_level": "medium",
        "max_output_tokens": 32768,
    },
    timeout=900.0,
)
if interaction.status != "completed" or not interaction.output_text:
    raise RuntimeError(f"Unexpected result: {interaction.status}")

print(interaction.output_text)
print("Usage:", interaction.usage)

Run it from the same Bash session:

python3 carbon_smoke.py

A successful smoke check returns text and usage without raising the result check. Inspect the answer: cached 0 and False should not trigger another load() call. Run the proposed tests in your normal test environment before accepting the change.

The SDK implementation defines the per-call timeout in seconds. Here, 900.0 allows 15 minutes. It is a time limit, not a prediction that this small task will take that long.

If the request is rejected, check the key’s project, paid billing status, and regional eligibility first. If interactions is missing from the client, update google-genai in the Python environment that runs the script.

What changes when you migrate?

Keep the migration small, but review token and time budgets before routing production traffic. Google separates Argon migration from migration off Gemini 3 and earlier.

From Gemini 4 Argon

Change gemini-4-argon to gemini-4-carbon; Google documents no request-schema changes for this switch. That does not mean the same request will have the same latency or bill.

Keep thinking_level at medium initially. Review max_output_tokens and timeouts because Carbon can spend more tokens on reasoning. Retain Argon for interactive edits and feature work that already meet your acceptance tests, especially when response time matters.

For an existing Managed Agents integration, retain agent="antigravity-preview-09-2026". Set agent_config={"type":"antigravity","model":"gemini-4-carbon"}. The agent identifier remains separate from the selected model.

From Gemini 3 and earlier

Update the model ID, then address four request behaviors:

  1. Remove explicit caching. Carbon does not support cachedContents or caches.create. Remove requests that create or reference cached_content.
  2. Remove sampling controls. Carbon ignores temperature, top_p, and top_k. Do not rely on those settings to preserve previous behavior.
  3. Review the output cap. Google recommends at least 32,768 when an existing application has a lower limit. Thinking consumes part of this budget, so a small cap can leave too little room for the answer.
  4. Allow longer execution. Use background execution or allow at least 15 minutes for blocking requests. Check application and proxy timeouts as well as the SDK setting.

Implicit caching remains available for prompts of at least 4,096 tokens. Cache hits receive a 95% input-token discount; repeated text alone is not a guarantee of a hit.

There is also an agent-loop condition in Google’s current caching guide: caching the full previous request requires at least 2,050 newly added tokens. Measure returned cache usage rather than applying the discounted rate to all repeated context.

How do you generate more than 65,536 tokens?

Use background=True and a larger max_output_tokens for server-managed long generation. Carbon has one 1,048,576-token window shared by input, thinking, and output. A large input therefore reduces the remaining generation budget.

Google lists 65,536 as the default output budget. It is not an absolute ceiling for every SDK-managed foreground call: the current long-decode guide also documents client-side continuation with Python SDK 2.34.0 or later.

The background path is useful when your application should submit work and retrieve it later. Setting background=True alone does not raise the output budget. Set max_output_tokens explicitly.

Background execution also requires stored interactions. Google documents a 400 error when background=True is combined with store=False. Review the storage and background-execution rules before submitting sensitive repository material.

Save the following as carbon_background.py. Put your approved, non-secret task specification in request.txt. The script can start a job or resume polling an existing interaction.

import os
import sys
import time
from pathlib import Path
from google import genai

if len(sys.argv) != 3 or sys.argv[1] not in ("start", "resume"):
    raise SystemExit(
        "Usage: python3 carbon_background.py start request.txt\n"
        "   or: python3 carbon_background.py resume INTERACTION_ID"
    )

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
mode, value = sys.argv[1:]

if mode == "resume":
    job = client.interactions.get(id=value)
else:
    prompt = Path(value).read_text(encoding="utf-8")
    if not prompt.strip():
        raise SystemExit("Request file is empty.")
    job = client.interactions.create(
        model="gemini-4-carbon",
        input=prompt,
        background=True,
        store=True,
        generation_config={
            "thinking_level": "medium",
            "max_output_tokens": 131072,
        },
    )

print("Interaction ID:", job.id, flush=True)

try:
    while job.status in ("queued", "in_progress"):
        time.sleep(5)
        job = client.interactions.get(id=job.id)
except KeyboardInterrupt:
    client.interactions.cancel(id=job.id)
    raise SystemExit("Cancellation requested.")

if job.status != "completed":
    raise RuntimeError(f"Interaction {job.id} stopped: {job.status}")

text = "".join(
    block.text
    for step in (job.steps or [])
    if step.type == "model_output"
    for block in (step.content or [])
    if block.type == "text" and block.text
)
if not text:
    raise RuntimeError("Completed without text; inspect the interaction steps.")

print(text)
print("Usage:", job.usage)

Start it in the same Bash session that holds your API key:

python3 carbon_background.py start request.txt

Save the printed interaction ID. After a network failure, run python3 carbon_background.py resume followed by that ID to retrieve the existing job. Do not automatically create another paid job because polling failed.

The script joins text from all model_output steps. Long generation can span several continuation steps, so reading only the last step can lose earlier output.

Pressing Ctrl+C requests cancellation rather than merely stopping polling. A cancelled job is not restarted by resume. For another terminal status, inspect the interaction before deciding whether to change the prompt or increase the budget.

The 131072 cap is a ceiling, not an expected response length. Confirm that the result is complete and passes your tests before accepting it.

How are Cursor and Copilot charges different?

Treat model selection and subscription accounting as separate checks. Access to Carbon in an editor does not make its usage free.

In Cursor, select Gemini 4 Carbon and start with Medium effort. Cursor’s model page says Carbon is outside the usage included with Cursor plans. On The X Subscription, it draws from prepaid credit. On legacy plans, it draws from the Other Models pool. Cursor also documents the higher December 1 token rates.

In GitHub Copilot, Carbon is available to Pro+, Max, Business, and Enterprise users. The November 10 release entry lists model selection in clients including VS Code and Copilot CLI. Rollout is gradual, and organization model policies can affect access.

Copilot bills Carbon at provider list pricing under usage-based billing. Do not import Cursor’s allowance rule into Copilot: GitHub’s billing documentation explains accounting by plan. For the alternative native-model path, compare Copilot Fusion effort levels and billing.

Before starting a long editor-agent run, make one bounded change and inspect its charged usage. Approve a default model only after its accepted-change rate, latency, and December budget meet your requirements.

Ready to optimize your LLM workflow?

Join thousands of developers building faster, smarter, and more cost-effective AI applications with BetterToken.

Get Started for Free