Gemini 4 Carbon API

Debug multi-step code, review security and run long agent workflows with Google's Gemini 4 Carbon

Modalities
Image, TextText
In / Out price
$2.33/$11.64per 1M
Context window
1.05M tokens
Released
Nov 10, 2026

Gemini 4 Carbon overview

The pelican test: one prompt, every text model, unedited SVG output from Nov 10, 2026.

SVG of a pelican riding a bicycle, written by Gemini 4 Carbon through AI/ML API

Gemini 4 Carbon by Google

Google built Gemini 4 Carbon for complex software engineering, scientific reasoning, cybersecurity defense and long-horizon agentic workflows. Google lists text, image, audio, video and PDF input for the model.

Gemini 4 Carbon specs

Model ID
google/gemini-4-carbon
Developer
Google
Context window
1,048,576 tokens
Max output
65,536 tokens
Input
Image, Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

Expect long reasoning on hard prompts

Google says Gemini 4 Carbon uses more tokens than Gemini 4 Argon to reason deeply, explore thoroughly and run extended verification loops. On a difficult prompt, the reasoning phase can therefore take a large share of the tokens you generate.

Log token usage on a sample of your real requests before you scale a workload.

Set reasoning effort first

The reasoning effort option accepts low, medium or high. Lowering it gives faster responses and fewer tokens spent on reasoning.

Start with medium. Move to high when multi-step coding or analysis answers fall short. Move to low for simple requests where speed matters more than depth.

Carbon or Argon

Google recommends Gemini 4 Carbon for complex multi-step coding and debugging, for open-ended scientific research and discovery, and for other tasks that test the limits of model intelligence. Gemini 4 Argon is Google's flagship reasoning model for complex software engineering, deep mathematical and scientific problem solving, and autonomous multi-step agents.

Run the same few of your hardest prompts through both models. Compare the answers and the reasoning tokens each one spends.

Use cases

Debug a multi-step failure across several files and propose a fix with verification steps.

Review code for vulnerabilities and draft patches for the issues found.

Work through an open-ended scientific question using excerpts and figures supplied as text and images.

Run a long-horizon agent workflow that plans, acts and checks its own results.

Capabilities

  • File input
  • Reasoning
  • Streaming
  • Structured outputs
  • Function calling
  • Vision

Gemini 4 Carbon benchmarks by Artificial Analysis

See how Gemini 4 Carbon compares in intelligence, generation speed and cost per task. Data retrieved Nov 9, 2026.

Intelligence

Index v5.0

Speed

Output tokens / second

Cost per task

USD / benchmark task

Benchmark results

Compare 5 models available on AI/ML API across 2 independent benchmarks.

Terminal-Bench 4.0

Agentic tasks completed in a command-line environment.

Gemini 4 Carbon API pricing

Gemini 4 Carbon pricing in US dollars
UsagePriceUnit
Input$2.331M tokens
Output$11.641M tokens
Cached input$0.11641M tokens

Prices from the AI/ML API price list, checked on Nov 10, 2026.

Gemini 4 Carbon vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
Gemini 4 Carbon$2.33$11.64
Gemini 3.8 Flash$0.75$3.75
Gemini 3.7 Flash$0.75$3.75
Gemini 3.6 Flash$1.5$7.5
Gemini 4 Argon$2$10

How to use the Gemini 4 Carbon API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "google/gemini-4-carbon",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Gemini 4 Carbon FAQ

How much does Gemini 4 Carbon cost?

Gemini 4 Carbon costs $2.3276 / 1M tokens for input and $11.638 / 1M tokens for output on AI/ML API. Cached input is billed at $0.11638 / 1M tokens.

Which reasoning effort should I start with?

Start with medium. Move to high if multi-step answers fall short, or to low for faster responses with fewer reasoning tokens.

What can I send to Gemini 4 Carbon here?

This endpoint is listed with image and text input and text output. Google lists text, image, audio, video and PDF input for the model itself.

How does it differ from Gemini 4 Argon?

Google says Gemini 4 Carbon uses more tokens than Gemini 4 Argon to reason deeply and run extended verification loops. Test both on your own hardest tasks.

How long can a response be?

The maximum output is 65,536 tokens. Reasoning tokens count toward generated output, so hard prompts leave less room for the visible answer.

What is the Gemini 4 Carbon model ID?

Use google/gemini-4-carbon as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.

What is the context window of Gemini 4 Carbon?

Gemini 4 Carbon accepts up to 1,048,576 tokens of context and returns up to 65,536 output tokens.

Start building with Gemini 4 Carbon

Gemini 4 Carbon API

google/gemini-4-carbon

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "google/gemini-4-carbon",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'