APIMart
Back to all models

Gemini 4 Carbon API

GoogleModel ID gemini-4-carbonText modelReleased November 10, 2026

Use Gemini 4 Carbon to split a large refactor across several agents and review what they return, check a financial model line by line against its source data, or work through a physics derivation step by step.

Max input
1,048,576 tokens
Max output
65,536 tokens
Input → output
Text, Image, Audio, Video → Text
Knowledge cutoff
March 2026
  • Image input
  • Streaming
  • Cached input pricing
  • OpenAI SDK compatible

Gemini 4 Carbon API use cases

Each use case comes with an illustrative example: source material, a prompt and a hand-written sample answer, not actual model output. Copy the prompt, swap in your own material and try it on Gemini 4 Carbon.

Try Gemini 4 Carbon with your own material

Engineering work split across agents

Give Gemini 4 Carbon the goal and the repository layout, and have it divide the work into tasks that do not touch the same files, hand them to faster models, and review each result. Run the full test suite after every merge, not only at the end.

Example: How should this refactor be divided?

Material

Task
Replace the hand-written HTTP client with the shared client library in the billing, orders and notifications services.
Repository
All three services import retry.py from a common/ folder; the shared client library has its own retry logic.

PromptSplit this refactor into tasks that can run in parallel without touching the same files, say which task must go first, and list what to verify after each merge.

Sample answer · written by hand to show the reasoning

Do common/ first: keep retry.py in place but mark it deprecated, so the three services still build. Then billing, orders and notifications can each be migrated in parallel by a faster model, because none of them edits another service’s files. After each merge, run that service’s tests and check that failed requests are retried once, not twice. Delete retry.py only after all three have merged.

About the Gemini 4 Carbon API

  • The deepest reasoning model in Gemini 4

    Google describes Gemini 4 Carbon as its most capable reasoning model. It is based on Gemini 4 Argon and spends more thinking tokens per task, and Gemini 4 Neon was later adapted from it for lighter production use.

  • Three thinking levels, medium by default

    Gemini 4 Carbon supports low, medium and high. Thinking tokens are billed as output, so raise the level to high only for the hardest steps and use low for simple ones.

  • Reads PDFs, Office files, audio and video

    Input covers text, images, audio and video, and it reads PDFs and Office documents directly. Input and output share one context window, and the knowledge cutoff is March 2026.

  • Gemini 4 Carbon API key and access

    You don’t need a separate Gemini 4 Carbon API key: one APIMart key works for every model. Requests go through an OpenAI Chat Completions-compatible endpoint with the model ID gemini-4-carbon.

Gemini 4 Carbon official benchmark results

Selected results Google published at launch.

  • Agents' Last Exam v1.1

    77.4%

    Multi-step professional workflows. Ahead of Claude Opus 5.5 (71.6%) and Gemini 4 Argon (69.0%).

  • GraphWalks

    96.2%

    Graph traversal (BFS) across 256K–1M tokens of context, scored by F1. Gemini 4 Argon scores 84.2% and Claude Opus 5.5 66.8%.

  • Terminal-Bench 4.0

    65.2%

    Coding tasks completed in a terminal. Ahead of Claude Opus 5.5 (59.6%) and Gemini 4 Argon (57.1%).

  • AutomationBench

    53.9%

    Business process automation. Gemini 4 Argon scores 51.3% and Claude Opus 5.5 42.5%.

  • RiemannBench

    80.0%

    Science and math reasoning. Gemini 4 Argon scores 76.0% and Claude Opus 5.5 69.6%.

  • OSWorld-2.1

    81.5%

    Computer use (offline subset). Behind Claude Opus 5.5 (87.2%) and ahead of Gemini 4 Argon (74.7%).

How to call the Gemini 4 Carbon API

To call Gemini 4 Carbon, you only need an APIMart API key and your existing OpenAI SDK, or send plain HTTP requests.

POST /v1/chat/completions
curl https://api.apimart.ai/v1/chat/completions \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-4-carbon",
  "messages": [
    {
      "role": "user",
      "content": "Describe how to design a clear API in three sentences."
    }
  ],
  "stream": false
}'

Gemini 4 Carbon access details

Model IDgemini-4-carbon
Base URLhttps://api.apimart.ai/v1
Endpoint/chat/completions

Common parameters

model
Required
messages
Required
stream
Optional
max_tokens
Optional
temperature
Optional
All request parameters, response fields and error codes

Gemini 4 Carbon API request parameters

Gemini 4 Carbon uses the general chat endpoint, POST /v1/chat/completions, with a JSON body. model and messages are required; every other parameter is optional.

ParameterTypeRequiredDescription
modelstringYesModel ID. Use gemini-4-carbon for this model.
messagesarrayYesConversation messages. Each message has a role (system, user, or assistant) and content. Include earlier messages for multi-turn conversations.
streambooleanNoWhether to stream the output. true returns chunks over SSE, false returns the full response at once. Default: true.
temperaturenumberNoOutput randomness, 0–2. Default: 1.0. Lower values give more deterministic output.
top_pnumberNoNucleus sampling, 0–1. Default: 1.0. Adjust this or temperature, not both.
max_tokensintegerNoMaximum number of tokens to generate for the reply.
frequency_penaltynumberNoFrequency penalty, -2.0 to 2.0. Default: 0. Positive values reduce repeated wording.
presence_penaltynumberNoPresence penalty, -2.0 to 2.0. Default: 0. Positive values encourage new topics.
stopstring | arrayNoUp to 4 stop sequences. Generation stops when any of them appears.
nintegerNoNumber of replies to generate. Default: 1.

Response fields

The response contains the fields below. Token usage is returned in usage, which you can use to check costs.

FieldTypeDescription
idstringUnique identifier for the request.
modelstringThe model that handled the request.
choicesarrayList of replies. Each item contains message (role and content) and finish_reason.
usageobjectToken usage: prompt_tokens, completion_tokens, and total_tokens.

Error codes

Failed requests return an error object with code, message, and type.

StatusTypeMeaning
400invalid_request_errorInvalid request parameters.
401authentication_errorThe API key is invalid or missing.
402payment_requiredInsufficient account balance.
403permission_errorNo permission to access this resource.
429rate_limit_errorToo many requests. Retry later.
500server_errorInternal server error.
502bad_gatewayGateway error. The service is temporarily unavailable.

Gemini 4 Carbon API pricing

The Gemini 4 Carbon API is billed by token usage, and prices depend on your membership tier. Prices below are per million tokens; 1 US dollar = 10 credits.

ItemGoldCurrent pricePlatinumDiamondOfficial priceYou save
Input16Credits~$1.615.2Credits~$1.5214.4Credits~$1.4420Credits~$220%
Cached input0.8Credits~$0.080.76Credits~$0.0760.72Credits~$0.0721Credits~$0.120%
Output80Credits~$876Credits~$7.672Credits~$7.2100Credits~$1020%

Prices are for reference only. View full pricing

Why call Gemini 4 Carbon API through APIMart

  • 20% below official pricing

    Gemini 4 Carbon API pricing is billed by token usage. Gold to Diamond member prices are 20%–28% below Google's official prices, and cached input costs just $0.08 per 1M tokens.

    See membership prices
  • One API key for 500+ models

    Gemini 4 Carbon, the rest of its family and 500+ models from GPT, Claude, Gemini and more share one API key and one account balance. Switching models is just a change to the model parameter.

  • Change two lines of existing code

    If you already use the OpenAI SDK, point base_url at https://api.apimart.ai/v1 and swap in your APIMart API key. Requests and responses keep the same format.

  • Try it online before you code

    Try Gemini 4 Carbon with your own material in the Playground, no code or setup needed, and integrate once you like the results.

    Open Playground

Which Google model should you choose?

Base prices per 1M tokens (USD). Your Gemini 4 Carbon API key works for every model in the table; just change the model parameter.

Differences between Google models
ComparisonGemini 4 Carbon CurrentGemini 3.8 FlashGemini 4 HydrogenGemini 4 ArgonGemini 4 Neon
Best forLong-horizon agents, Software engineering, Scientific reasoningLong-horizon coding, Video, audio & PDF input, Enterprise workflowsEveryday coding, Agentic tasks, Chat & questionsSoftware engineering, Knowledge work, Long video and documentsComplex coding, Long-running agents, Analytical reasoning
Input typesText, Image, Audio, VideoText, Image, Video, Audio, FileText, Image, Audio, VideoText, Image, Audio, VideoText, Image, Audio, Video
Input price$1.6$0.6$1.2$1.6$2.4
Output price$8$3$6$8$12

Gemini 4 Carbon FAQ

How is Gemini 4 Carbon different from Gemini 4 Neon and Hydrogen?

Carbon is the deepest of the three: Google calls it its most capable reasoning model, built for complex software engineering and long-horizon agentic work. Neon was adapted from Carbon to balance depth and efficiency, and Hydrogen is built for fast everyday execution at a lower price per token. On APIMart all of them share one endpoint and API key; you only change the model parameter.

Should I use Gemini 4 Carbon or Gemini 4 Argon?

Use Carbon when the task is hard enough to need more reasoning, and Argon when response time and token spend matter more. Carbon is based on Argon and uses more thinking tokens; Google describes Argon as giving faster responses and lower token spend per turn than Carbon.

What changes when moving from Gemini 3.1 Pro Preview to Gemini 4 Carbon?

Google’s developer guide covers the move from gemini-3.1-pro-preview to gemini-4-carbon: replace thinking budgets and the minimal level with a thinking level of low, medium or high, and remove temperature, top_p, top_k, frequency_penalty, presence_penalty, explicit caching and prefilled model turns. On APIMart the base_url and API key stay the same: change the model parameter and rerun your own prompts to compare the output.

Which parameters cause errors with Gemini 4 Carbon?

According to Google’s developer guide, sending frequency_penalty or presence_penalty, asking for more than one candidate, setting the thinking level to minimal, or using a thinking budget returns a 400 error. A conversation that ends with a prefilled model turn is also rejected, and temperature, top_p and top_k are ignored. Use the three thinking levels instead: low, medium (the default) and high.

How do I keep Gemini 4 Carbon costs down?

Lower the thinking level and reuse prompt prefixes. Thinking tokens are billed as output, and the model card notes higher token use at high thinking levels, so use low or medium unless the task needs more. Carbon also uses implicit caching: when requests share a prefix of at least 4,096 tokens, the cached part is billed at the cached-input rate shown in the pricing table. Explicit caching is not supported.

How can I try this model online?

Click Start chatting or Open Playground to visit the existing APIMart Playground. Select Gemini 4 Carbon in the text category to start exploring.

Which model ID does the Gemini 4 Carbon API use?

Set model to gemini-4-carbon. Copy the exact ID from the page heading or the integration details panel.

Is it compatible with the OpenAI SDK?

You can keep the OpenAI SDK. Set base_url to https://api.apimart.ai/v1, provide your APIMart API key, and use the model ID on this page.

What is the context window of Gemini 4 Carbon?

On APIMart, Gemini 4 Carbon accepts up to 1,048,576 input tokens per request. Your prompt, earlier messages, and file content all count toward it.

How many tokens can it output at once?

Gemini 4 Carbon can output up to 65,536 tokens in a single reply. Use the max_tokens parameter to set a lower limit.

How much does the Gemini 4 Carbon API cost?

The Gemini 4 Carbon API on APIMart is billed by token, and prices depend on your membership tier. Gold: $1.6 per million input tokens and $8 per million output tokens. Diamond: $1.44 per million input tokens and $7.2 per million output tokens. Prices may change; the pricing page has the current rates.

Does it support streaming?

Yes. The general chat endpoint streams over SSE by default. Set stream to false to receive the complete response at once.

How do I get an API key?

Sign in to APIMart and create a key on the API Keys page, then send it in the Authorization: Bearer header. The same key also works for other models on the platform.