Google made Gemini 4 Argon generally available to developers on October 13, 2026. It is the company's most capable model in the Gemini API, aimed at long, multi-step work such as code migrations, agentic workflows, and hard math and science problems. Argon reasons for longer than earlier Gemini models, shares a single 1,048,576-token window across input, thinking and output, and can now write a single response far longer than the old 64K-token ceiling.
This guide is for developers who want to call Argon from their own code. It walks through access requirements, the first request in Python, JavaScript and REST, how to choose a thinking level, how to generate very long outputs with background execution, and the changes you need to make if you are moving an existing app over from an older Gemini model.
What is new in Gemini 4 Argon
The model ID is gemini-4-argon. Its headline changes are a unified 1M-token limit for input and output together, long decode that lets one response run up to 1M tokens minus your input, tunable thinking levels (low, medium and high, with medium as the default), and support inside the Antigravity agent in Gemini Managed Agents. Agentic video understanding is also generally available alongside it.
Requirements and pricing
Argon is not available on the free tier of the Gemini API, and it is not included in the Google AI Pro plan. You need one of two things: a Gemini API project on the paid tier, or a Google AI Ultra subscription for trying it in Google AI Studio and in Google Antigravity.
Through November 30, 2026, Google is charging an introductory price of $2 per million input tokens and $10 per million output tokens, with thinking tokens billed as output. From December 1, 2026 the price rises to $4 and $20. Implicit caching discounts cached input by 95 percent, to $0.10 per million tokens during the introductory period and $0.20 afterward. Because Argon can spend a lot of tokens on thinking, budget for output costs carefully on hard prompts.
You will also need Python with pip or Node.js with npm if you plan to use an SDK, or curl and jq for the REST examples.
Step 1: Get a paid-tier API key
Open the API keys page in Google AI Studio. New users get a project and key created automatically; otherwise select Create API key.
Select Set up billing on the API keys or Projects page and follow the Cloud Billing dialog. Google requires you to link a billing account, add a payment method and prepay a minimum of $5 (or the local currency equivalent) in credits.
Store the key in an environment variable so the SDKs can find it without hard-coding it:
BashCopy export GEMINI_API_KEY="YOUR_API_KEY"
Step 2: Install an SDK
- Install or upgrade the Google Gen AI SDK for your language:
BashCopy
shell
pip install -U google-genai
plaintext
BashCopy
shell
npm install @google/genai
markdown
Step 3: Send your first request
- Argon is used through the Interactions API. A minimal Python call looks like this:
PythonCopy
python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-4-argon",
input="Review this function for race conditions and suggest a safer locking strategy."
)
print(interaction.output_text)
plaintext
- The same request over REST, which is handy for a quick test from a terminal:
BashCopy
shell
curl "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"model": "gemini-4-argon",
"input": "Explain the trade-offs between optimistic and pessimistic locking."
}'
markdown
Step 4: Pick the right thinking level
The thinking level is your main control over quality, latency and cost. Low uses the fewest tokens and suits simpler or cost-sensitive work, though quality can drop on hard tasks. Medium is the default and is recommended for most jobs, including complex code and agents. High uses the most tokens and has the slowest first token, and is meant for the hardest reasoning, math, science and coding tasks.
- Set it in generation_config:
PythonCopy
python
interaction = client.interactions.create(
model="gemini-4-argon",
input="Plan a step-by-step migration of this service from callbacks to async/await.",
generation_config={"thinking_level": "medium"}
)
markdown
- Google's advice is to run your own evaluations at all three levels and keep the lowest one that meets your quality bar. That single choice usually has the biggest effect on your bill.
Step 5: Generate very long outputs
By default a response is capped at 65,536 tokens. To go further, set background to true and max_output_tokens above 65,536. The server then generates the answer in hops of up to 64K tokens, continuing each hop where the last one stopped, and adds a model_output step for every hop.
- Start the job, poll until it finishes, then join the text from every model_output step:
PythonCopy
python
import time
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-4-argon",
input="Write full API documentation for the attached module.",
background=True,
generation_config={"max_output_tokens": 262144, "thinking_level": "high"},
)
while interaction.status in ("in_progress", "queued"):
time.sleep(5)
interaction = client.interactions.get(id=interaction.id)
text = "".join(
c.text
for step in interaction.steps if step.type == "model_output"
for c in step.content if c.type == "text"
)
print(text)
markdown
If you set background to true but leave out max_output_tokens, the server still stops at 64K tokens, so always set both.
Step 6: Migrate an existing app
Change the model string to gemini-4-argon.
Review max_output_tokens. If your app sets a limit below 32K, raise it to at least 32,768, because Argon can spend more of the budget on thinking. To save tokens, lower the thinking level instead of the limit.
Remove temperature, top_p and top_k. Argon ignores them.
Remove explicit context caching. Calls that create or reference cachedContents are not supported on Argon. Implicit caching is on by default for prompts of at least 4,096 tokens.
Raise HTTP client timeouts to at least 15 minutes, or use background execution, because hard prompts can take several minutes.
Keep multi-turn and function-calling state on the server by passing previous_interaction_id rather than resending history yourself.
Using Argon in Android Studio and Antigravity
Android developers can reach Argon in Android Studio through a paid-tier Gemini API key, or, with a Google AI Ultra subscription, by signing in to Antigravity in the latest Android Studio Canary. To connect an agent to local Android build tools from the terminal, install the official plugin for Antigravity, or initialize the Android CLI for any terminal agent:
BashCopy
shell
agy plugin install android-cli-plugin
plaintext
BashCopy
plaintext
android init
Troubleshooting
Requests to gemini-4-argon fail while other models work: check which tier your key belongs to. Argon is not offered on the free tier or through Google AI Pro, so the project needs billing set up.
Answers end abruptly: the response probably hit max_output_tokens, which counts thinking and output together. Raise the limit, or lower the thinking level so less of the budget goes to reasoning.
Output stops near 64K tokens: long decode needs both background set to true and max_output_tokens above 65,536.
Requests time out: increase your client timeout to at least 15 minutes or switch to background execution and poll.
Code that used caches.create breaks: explicit caching is not supported on Argon. Remove it and rely on implicit caching instead.
Temperature changes have no effect: this is expected. Sampling parameters are ignored on Argon; use thinking_level to steer behavior.
Frequently Asked Questions
Can I use Gemini 4 Argon for free?
No. It is not available on the Gemini API free tier or the Google AI Pro plan. You need the paid tier of the Gemini API, or a Google AI Ultra subscription to try it in AI Studio and Antigravity.
How large is the context window?
Input, thinking and output share one window of 1,048,576 tokens. A single response can use up to 1M tokens minus your input when you enable background execution.
Which thinking level should I start with?
Start with the default, medium. Then test low and high on your own prompts and keep the lowest level that still meets your quality bar.
Will my existing temperature settings still work?
They will not cause errors, but Argon ignores temperature, top_p and top_k. Remove them to keep your requests clean.
Originally published on Mango Developer.
