Atualizado
What is the Gemini 4 Carbon API?
The Gemini 4 Carbon API is live on UnificAlly as google/gemini-4-carbon, from $0.60/1M tokens of input and $3/1M tokens of output. Gemini 4 Carbon is Google's most capable reasoning model and the second model in the Gemini 4 family, announced October 28, 2026 and opened to developers on November 10, 2026. It is built for long agentic coding runs, knowledge work in finance and law, scientific reasoning, and security defense. Input and output share one 1M-token window, and one response returns up to 64K tokens. It runs on UnificAlly as google/gemini-4-carbon, with text and image input and three reasoning effort levels (low, medium, high).
Gemini 4 Carbon API specs
| Model ID | google/gemini-4-carbon |
| Endpoint | POST https://direct-api.unifically.com/v1/chat/completions |
| Request types | Chat, streaming, image input |
| Input | Text and images |
| Output | Text, up to 64K tokens per response |
| Context window | 1M tokens, shared by input and output |
| Reasoning effort | low, medium, high |
| Image input | An image_url content part with a direct https link or a data:image/...;base64 URI, up to 14 MB per link |
| Input rate | $0.60/1M tokens |
| Output rate | $3/1M tokens |
| Cache read rate | $0.03/1M tokens |
The Gemini 4 Carbon API bills per token, with no subscription. Thinking tokens are billed as output tokens. The pricing page shows the live rates.
How to use the Gemini 4 Carbon API
- Create an API key on the API keys page.
- Send a POST request to
/v1/chat/completionsonhttps://direct-api.unifically.comwith the model ID and amessagesarray. - Read the reply from
choices[0].message.contentin the same response, or from the stream whenstreamistrue.
curl -X POST https://direct-api.unifically.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d '{
"model": "google/gemini-4-carbon",
"reasoning_effort": "high",
"stream": true,
"messages": [
{ "role": "user", "content": "Review this module for security bugs, rank them by severity, and write a patch for the worst one." }
]
}'
Tokens arrive as they generate. The stream is sent as server-sent events and ends with data: [DONE]. Streaming is the safer default on this model, since a reply at high can take minutes. Lower reasoning_effort to low for quick steps. Send requests to direct-api.unifically.com so long replies are not cut short by a proxy timeout.
Without stream, the response comes back synchronously with the completion and the token usage:
{
"id": "3f8e2a1c-7b4d-4e9a-9c2f-5d1e8b7a6c40",
"object": "chat.completion",
"created": 1710000000,
"model": "google/gemini-4-carbon",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "I found three security bugs, ranked by severity..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 28,
"completion_tokens": 64,
"total_tokens": 92,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}
Gemini 4 Carbon API parameters
| Parameter | Type | Default | What it does |
|---|---|---|---|
model | string | required | Model identifier, google/gemini-4-carbon |
messages | array | required | Non-empty array of message objects with role and content (a string or an array of content parts). Roles: system, developer, user, assistant, tool, function |
stream | boolean | false | If true, the response is streamed using server-sent events |
stream_options | object | none | Set { "include_usage": true } to get a final chunk with token usage. Only used when stream is true |
temperature | number | none | Sampling temperature between 0 and 2. Higher values produce more random output |
max_tokens | integer | none | Maximum number of tokens to generate in the completion |
max_completion_tokens | integer | none | Accepted as an alias for max_tokens |
reasoning_effort | string | none | How much the model reasons before answering: low, medium, or high |
top_p | number | none | Nucleus sampling parameter. Alternative to temperature |
stop | string or array | none | Up to four sequences where the model stops generating further tokens |
tools | array | none | List of tools the model may call. Each tool needs a type and a function definition |
tool_choice | string or object | none | Controls which tool, if any, is called: none, auto, required, or a specific tool |
response_format | object | none | Set { "type": "json_object" } to enable JSON mode when the model supports it |
The Gemini 4 Carbon API documentation has the full reference.
Image input request
Send an image in an image_url content part alongside your text, either as a direct https link or inline as a base64 data URI. The link must point straight at the image file, with no redirect. Images are counted as input tokens.
curl -X POST https://direct-api.unifically.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d '{
"model": "google/gemini-4-carbon",
"messages": [
{"role": "user", "content": [
{"type": "text", "text": "Read every label in this diagram and explain how the parts connect."},
{"type": "image_url", "image_url": {"url": "https://example.com/diagram.png"}}
]}
]
}'
Gemini 4 Carbon key features
Rank 4 on the Artificial Analysis Intelligence Index
It scores 60 on the Artificial Analysis Intelligence Index v5.0.1, rank 4 of 74 models and ten points above Gemini 4 Argon at 50. On the Vals Index it reaches 70.5%, third of 36 models.
#1 for finance, tax, and legal research
It leads the Vals Finance Index at 67.1%, Tax Agent Bench at 51.8%, and Legal Research Bench at 55.8%. Each is first place on its board.
Security work from finding to patch
Google reports 88.2% on SEC-bench Pro for finding vulnerabilities, 54.8% on ExploitGym, and 71.0% on CWE-bench for writing the patch.
Long terminal runs
Terminal-Bench 4.0 lands at 63.1% on the Vals AI run, fifth of 63 models and up from 57.6% for Gemini 4 Argon. The 1M-token window keeps a whole repository and a long tool history in one call.
What Gemini 4 Carbon is best for
Long coding agents
63.1% on Terminal-Bench 4.0 and 89.1% on Vibe Code Bench v1.1 for multi-step builds and repairs.
Finance analysis
#1 on the Vals Finance Index at 67.1% for filings, models, and reconciliations.
Tax and legal research
#1 on Tax Agent Bench at 51.8% and Legal Research Bench at 55.8%.
Security review
88.2% on SEC-bench Pro and 71.0% on CWE-bench for finding a bug and writing the fix.
Whole-codebase context
A 1M-token window with up to 64K tokens out in one response.
Hard multi-step reasoning
60 on the Artificial Analysis Intelligence Index at
higheffort.
Gemini 4 Carbon use cases
Hand it the long jobs. Run a coding agent that works through a failing build in the terminal, reads the logs, and keeps going until the tests pass. Build finance and tax pipelines that read filings, check the numbers against each other, and draft the memo. Use it for legal research that has to find the right authority and cite it. Point it at a service for a security review that finds the vulnerability, explains the risk, and writes the patch. Load a large repository or a long document set into one request and ask questions across all of it.
Gemini 4 Carbon limitations
It is slow and it writes a lot. Artificial Analysis measures about 80 output tokens per second and more than a minute before the first answer token at high. It used 205M output tokens to finish the Intelligence Index against a median of 72.8M. Thinking tokens bill as output, so a long job costs more than the per-token rate suggests.
It does not lead every board. It ranks third on the Vals Index, and Gemini 4 Argon still beats it on Vibe Code Bench v1.1 (91.9% against 89.1%) and the Vals Legal Index (76.8% against 75.9%).
Google measured the security scores without the safety filters the public model ships with. Expect refusals on offensive security requests.
Images go in as direct https links or inline base64 data URIs, and a link that redirects is refused. Video and audio input are not available on this model yet, and one response tops out at 64K tokens.
Gemini 4 Carbon vs Gemini 4 Argon
Carbon is the stronger reasoner. The Artificial Analysis Intelligence Index goes from 50 to 60, the Vals Index from 69.4% to 70.5%, Terminal-Bench 4.0 from 57.6% to 63.1%, and Tax Agent Bench from 49.2% to 51.8%. Argon answers sooner, spends about half the output tokens on the same Intelligence Index run, and keeps the lead on Vibe Code Bench v1.1. Both share the 1M-token window and the same three effort levels.
When to use Gemini 4 Carbon
Use Gemini 4 Carbon when the task is long, the answer has to be right, and waiting is fine: terminal agents, finance and tax analysis, legal research, and security review. Stay on Gemini 4 Argon for everyday coding and knowledge work, where it is quicker and uses fewer tokens. Drop to Gemini 3.8 Flash when speed matters more than depth.
Perguntas frequentes
Perguntas frequentes sobre Gemini 4 Carbon
google/gemini-4-carbon, called through the OpenAI-compatible POST /v1/chat/completions endpoint with your UnificAlly API key.
Carbon uses the key you create on the API keys page after signup, sent as Authorization: Bearer <key> to https://direct-api.unifically.com/v1/chat/completions. That endpoint is OpenAI-compatible, so an OpenAI SDK with its base URL set to https://direct-api.unifically.com/v1 and the model google/gemini-4-carbon is ready to go; usage comes out of a prepaid balance.
Streaming is the safer way to call it: post model: google/gemini-4-carbon with messages and "stream": true, and tokens arrive as server-sent events ending in data: [DONE], since a high reply can take minutes. Images go in an image_url content part as an https link or base64 data URI. Without streaming, the full answer comes back in choices[0].message.content.
Text and image input, with text output. Send images as direct https links or inline as base64 data URIs. Input and output share one 1M-token window, and a single chat completion returns up to 64K output tokens.
Three. reasoning_effort takes low, medium, and high. Thinking tokens are billed as output tokens.
It scores 60 on the Artificial Analysis Intelligence Index v5.0.1, rank 4 of 74, and 70.5% on the Vals Index, rank 3 of 36. It is #1 on the Vals Finance Index at 67.1%, #1 on Tax Agent Bench at 51.8%, and #1 on Legal Research Bench at 55.8%. Google reports 88.2% on SEC-bench Pro and 71.0% on CWE-bench.
On the hardest work, yes. The Artificial Analysis Intelligence Index rises from 50 to 60, the Vals Index from 69.4% to 70.5%, and Terminal-Bench 4.0 from 57.6% to 63.1%. Carbon thinks longer and writes more, and Gemini 4 Argon still leads Vibe Code Bench v1.1, so Argon stays the pick for everyday coding.
It is slow. Artificial Analysis measures about 80 output tokens per second and more than a minute before the first answer token at high. Stream long replies and set client timeouts with headroom.
Google announced it on October 28, 2026 and opened it to developers on November 10, 2026. It is the second model in the Gemini 4 family, after Gemini 4 Argon.