What Is Gemini 3.8 Flash?

A technical guide to Google's Gemini 3.8 Flash: $0.75/M input pricing, 1M context, thinking levels, 2027 price doubling, Antigravity integration, and benchmarks.

Gemini 3.8 Flash (API model identifier gemini-3.8-flash) is Google's production-ready Flash-tier foundation model, released on September 2, 2026. Engineered for long-horizon software engineering, autonomous agents, and multi-step tool execution, it features a 1,048,576-token context window (~1M tokens), a 65,536-token maximum output limit (64K), and general availability across Google AI Studio, the Gemini API, Google Cloud Vertex AI, and Google Antigravity.

Through December 31, 2026, Google offers introductory API pricing of $0.75 per million input tokens and $3.75 per million output tokens (including thinking tokens). On January 1, 2027, standard pricing takes effect, doubling rates to $1.50 per million input tokens and $7.50 per million output tokens. Prompt-cache reads cost $0.075 per million tokens ($0.15/M in 2027), with cache storage at $0.50 per million tokens per hour ($1.00/M/hr in 2027).

Unlike its predecessor Gemini 3.7 Flash, 3.8 Flash is architected to work iteratively on complex engineering tasks. It decomposes problems into discrete reasoning steps, self-verifies intermediate outputs, and executes tool calls in loops. This architectural shift produces gains on agentic coding evaluations—such as scoring 89.4% on Terminal-Bench 2.1 (up from 85.8% on 3.7 Flash) and 73.7% on DeepSWE v1.1 (up from 65.3%). However, that reasoning effort carries a direct operational tradeoff: because 3.8 Flash performs more reasoning steps and tool loops on demanding tasks, it often consumes more total tokens—and incurs higher task costs—than running simpler workloads.

DimensionGemini 3.8 Flash (gemini-3.8-flash)Gemini 3.7 Flash (gemini-3.7-flash)Operational Difference
Release DateSeptember 2, 2026August 2026Successor Flash iteration
Primary WorkloadLong-horizon coding, agent loops, iterative toolsFast generation, low-latency classification, chatRe-architected for iterative tool execution
Context Window1,048,576 tokens (~1M)1,048,576 tokens (~1M)Identical input capacity
Maximum Output65,536 tokens (64K)65,536 tokens (64K)Identical output ceiling
Thinking Parameterthinking_level: "low", "medium", "high"thinking_level: "low", "medium", "high"Both use thinking_level; legacy integer thinking_budget replaced
Default Thinking"medium""medium"Both default to "medium"; "minimal" is not supported
Introductory Pricing (thru Dec 31, 2026)$0.75 / 1M input · $3.75 / 1M output$0.75 / 1M input · $3.75 / 1M outputParity list price during introductory window
Standard Pricing (eff. Jan 1, 2027)$1.50 / 1M input · $7.50 / 1M output$1.50 / 1M input · $7.50 / 1M outputStandard rates double for both models
Context Cache Read$0.075 / 1M tokens ($0.15 in 2027)$0.075 / 1M tokens ($0.15 in 2027)10% of base input rate
Antigravity RoleDefault model in Antigravity agent (Gemini Managed Agents)Supported modelGoogle builds the Antigravity managed agent on 3.8 Flash by default
Terminal-Bench 2.189.4%85.8%+3.6 percentage points on command-line tasks
DeepSWE v1.173.7%65.3%+8.4 percentage points on SWE benchmarks

Technical Specifications and Platform Availability

Gemini 3.8 Flash uses the stable API model identifier gemini-3.8-flash. It is generally available across Google's first-party developer and enterprise surfaces, intended for production deployments rather than experimental testing.

Context Boundaries and Modalities

The model processes multimodal inputs up to 1,048,576 tokens:

  • Supported Inputs: Text, code, images, audio, video streams, and PDF documents.
  • Supported Outputs: Up to 65,536 tokens of text, code, or structured JSON.
  • Context Caching: Prompts meeting the 4,096-token minimum threshold can be cached, with cached tokens persisted for 1 hour by default (configurable TTL).

The 65,536-token maximum output accommodates large refactor diffs, multi-file code generation, and comprehensive synthesis reports in a single generation without truncation.

The Security Variant: Gemini 3.8 Flash Cyber

Alongside the public model, Google introduced Gemini 3.8 Flash Cyber. This is a specialized, security-hardened twin model fine-tuned for automated vulnerability discovery, root-cause exploitation analysis, and security patch verification.


API Pricing Schedule and the January 2027 Transition

Google has structured the pricing for Gemini 3.8 Flash with a promotional introductory period that expires at the end of 2026. Engineering teams deploying 3.8 Flash into production must account for both the current rates and the scheduled transition date.

Introductory Rates (Through December 31, 2026)

  • Standard Input Tokens: $0.75 per 1,000,000 tokens
  • Standard Output Tokens: $3.75 per 1,000,000 tokens (includes generated thinking tokens)
  • Context Caching (Read): $0.075 per 1,000,000 tokens (10% of base input)
  • Context Caching (Storage): $0.50 per 1,000,000 tokens per hour
  • Batch API: 50% discount on base rates ($0.375/M input, $1.875/M output) for non-urgent jobs completed within 24 hours

Standard Rates (Effective January 1, 2027)

Beginning January 1, 2027, list pricing doubles across all token types:

  • Standard Input Tokens: $1.50 per 1,000,000 tokens
  • Standard Output Tokens: $7.50 per 1,000,000 tokens
  • Context Caching (Read): $0.15 per 1,000,000 tokens
  • Context Caching (Storage): $1.00 per 1,000,000 tokens per hour
  • Batch API: $0.75 per 1,000,000 input tokens and $3.75 per 1,000,000 output tokens
Pricing TierInput (per 1M tokens)Output (per 1M tokens, incl. thinking)Cache Read (per 1M tokens)Cache Storage (per 1M tokens / hr)
Introductory (Through Dec 31, 2026)$0.75$3.75$0.075$0.50
Standard (Effective Jan 1, 2027)$1.50$7.50$0.150$1.00
Introductory Batch (50% discount)$0.375$1.875N/AN/A
Standard Batch (50% discount)$0.750$3.750N/AN/A

Thinking Levels and Operational Token Economics

Gemini 3.8 Flash uses Google's native test-time compute architecture. Rather than relying on a separate "reasoning model" brand, Google integrates variable thinking directly into the Flash foundation model.

Configuring Thinking via thinking_level

Google's migration documentation instructs developers to replace the legacy integer parameter thinking_budget with the string enum parameter thinking_level in the google-genai SDK (v2+) and REST API. Both Gemini 3.8 Flash and Gemini 3.7 Flash support three thinking levels:

  • "low": Restricts internal chain-of-thought tokens to reduce latency and token volume. Tailored for straightforward transformations, quick schema generation, and tasks with low ambiguity.
  • "medium" (Default): The standard balanced configuration. Enables multi-step reasoning, preliminary validation passes, and moderate tool exploration before generating final responses.
  • "high": Maximizes reasoning tokens and iterative deductions. Designed for complex code refactoring, mathematical proofs, cross-file debugging, and multi-turn autonomous planning.

The Billing Reality: Thinking Tokens Count as Output

A critical operational factor for engineering teams: thinking tokens are billed at the standard output token rate ($3.75 per million tokens currently, doubling to $7.50 per million tokens on January 1, 2027).

Google's documentation confirms that Gemini 3.8 Flash can consume more total tokens on complex tasks because it performs more reasoning steps, calls tools iteratively, and verifies work. Because thinking tokens are billed as output tokens, intermediate reasoning steps can account for a substantial portion of a request's total cost. For tasks where deep deductive exploration is not required, setting thinking_level="low" or "medium" prevents unneeded reasoning overhead from inflating operating expenses.

SDK Configuration Example

from google import genai
from google.genai import types

client = genai.Client()

# Recommended production configuration for multi-step agent tasks
response = client.models.generate_content(
    model="gemini-3.8-flash",
    contents="Refactor the authentication middleware to support token revocation.",
    config=types.GenerateContentConfig(
        thinking_config=types.ThinkingConfig(
            thinking_level="medium"  # Options: "low", "medium", "high"
        ),
        # Google recommends keeping temperature at default (1.0).
        # Overriding temperature or top_p can impair reasoning calibration.
    ),
)

print(response.text)

Tool Integration and Agentic Capabilities

Gemini 3.8 Flash is specifically optimized to act as an execution engine inside autonomous software workflows. It natively supports five core tool primitives:

1. Function Calling with Thought Signatures

Developers can pass custom client-side function declarations alongside the request. Gemini 3.8 Flash supports:

  • Multimodal Function Returns: Tools can return image buffers, audio clips, or structured documents back into the model context in subsequent turns.
  • Thought Signatures: When operating in stateless client modes across multiple round-trips, the API passes encrypted thought signatures to preserve the model's internal reasoning state without leaking raw chain-of-thought data.
  • Strict Response Mapping: Unlike older models where tool responses could omit call identifiers, 3.8 Flash enforces strict association between function names and specific call_id tokens.

2. Sandboxed Code Execution

The model can dynamically write and execute Python code in an isolated Google sandbox to compute answers, verify algorithms, or parse datasets. In multimodal workflows, 3.8 Flash uses code execution to crop, zoom, and inspect specific pixel regions of complex diagrams before generating answers.

3. Structured Outputs

You can constrain responses to strict JSON schemas by defining a Pydantic model or JSON Schema object. In Gemini 3.8 Flash, structured output enforcement can be combined directly with function calling and search grounding, ensuring that the model gathers external data while still returning a valid, strictly typed payload.

4. Search Grounding, URL Context, and File Search

The model natively supports dynamic retrieval via Google Search grounding, reading live URLs, and indexing unstructured files up to the 1M-token boundary.

5. Computer Use (Preview)

For browser and desktop automation, Gemini 3.8 Flash includes native computer use primitives. It can observe screen captures, emit keyboard and mouse action coordinates, and navigate web applications. On the OSWorld-2.0 benchmark, it achieves a 59.0% completion rate.


Gemini 3.8 Flash vs. 3.7 Flash: When to Upgrade

Google continues to support both Gemini 3.7 Flash and Gemini 3.8 Flash. Because list prices are currently identical, engineering teams must evaluate which model fits their specific operational profile.

Where Gemini 3.8 Flash Materially Improves

The primary advantage of 3.8 Flash is iterative problem decomposition and agent tool loops:

  1. Agentic Coding & Terminal Navigation: On Terminal-Bench 2.1, 3.8 Flash reaches 89.4% (compared to 85.8% for 3.7 Flash), demonstrating stronger command execution, error diagnosis, and tool iteration in command-line environments.
  2. Software Engineering Workflows: On DeepSWE v1.1, 3.8 Flash scores 73.7% compared to 3.7 Flash's 65.3%, exhibiting fewer premature completions on multi-file software engineering tasks.
  3. Harder Terminal Tasks: On Terminal-Bench 4.0, 3.8 Flash improves to 19.1% compared to 11.2% for 3.7 Flash, reflecting better handling of ambiguous terminal failures.

Where Gemini 3.7 Flash Remains the Practical Choice

Gemini 3.8 Flash is not an automatic replacement for every workload:

  • High-Throughput Single-Pass APIs: For straightforward classification, entity extraction, or high-volume routing where deep iterative verification is unnecessary, Gemini 3.7 Flash remains a proven, stable foundation. Both models can be configured with thinking_level="low" to reduce latency and output token volume.
  • General Academic Reasoning: On broad academic evaluations like Humanity's Last Exam (HLE Verified), performance is comparable (53.6% on 3.7 Flash vs. 54.9% on 3.8 Flash). Gemini 3.8 Flash's architectural improvements are concentrated in tool-calling, agent loops, and coding execution rather than general knowledge recall.

Evaluation Evidence: Vendor Claims, Independent Reality, and Known Losses

Google DeepMind published extensive benchmark data in its Gemini 3.8 Flash model card. Technical builders should evaluate these numbers with context, preserving both what the model excels at and where it hits clear boundaries.

Vendor-Reported Benchmark Results

BenchmarkGemini 3.8 FlashGemini 3.7 FlashClaude Opus 5Notes & Harness Context
DeepSWE v1.173.7%65.3%74.0%Multi-file software engineering
Terminal-Bench 2.189.4%85.8%89.1%Command-line tool execution
Terminal-Bench 4.019.1%11.2%51.8%Hard long-horizon terminal tasks
Vals Finance Agent v261.4%59.0%58.6%Financial analysis and tool orchestration
Harvey's Legal Agent Benchmark10.0%8.8%6.7%Specialized legal domain reasoning
HLE Verified54.9%53.6%54.4%Humanity's Last Exam (verified subset)
OSWorld 2.0 (Computer Use)59.0%50.6%75.4%Multimodal desktop and OS automation

Interpreting the Loss Vectors

Two results in Google's disclosures highlight the practical boundaries of Gemini 3.8 Flash:

  1. Computer Use Lag (OSWorld 2.0): Scoring 59.0% places Gemini 3.8 Flash behind Anthropic's Claude Opus 5 (75.4%), a 16.4 percentage point gap (though improved from 50.6% on Gemini 3.7 Flash). If your autonomous workflow relies on complex desktop GUI navigation and dense visual layouts, Claude Opus 5 demonstrates higher completion rates.
  2. Terminal-Bench 4.0 Dropoff: While 3.8 Flash reaches 89.4% on Terminal-Bench 2.1, its score falls to 19.1% on Terminal-Bench 4.0 (where Claude Opus 5 achieves 51.8%). When command-line tasks involve multi-repository configuration ambiguities and long-horizon failure recovery, mid-tier models encounter significant ceilings.

First-Party Measurement: Banking77 Intent Routing

In AI Model Waddle's September 20, 2026 controlled benchmark (Jev vs. Structured Outputscomparison), we tested gemini-3.8-flash in structured JSON mode against TypeSafe Jev (jev-1.13.0) across 385 banking support queries:

  • Accuracy: Gemini achieved 83.64% top-1 accuracy (322 / 385 correct), beating Jev's 79.48% (306 / 385) by 4.16 percentage points ($p = 0.0166$). Gemini resolved subtle boundary cases—such as distinguishing card replacement from lost cards—more reliably than Jev.
  • Latency: Gemini's median latency was 1,203.82ms (with a p95 of 3,245.01ms and a max tail of 10,738.12ms), compared to Jev's median of 187.87ms (p95 of 319.55ms).
  • Cost: Across the 385 calls, Gemini cost $0.4570 per 1,000 decisions, compared to $0.0679 per 1,000 decisions for Jev (Jev was 6.7x cheaper).

This measurement demonstrates the exact architectural trade-off: Gemini 3.8 Flash provides higher reasoning accuracy on ambiguous language boundaries, but introduces multi-second latency and higher token costs compared to specialized non-autoregressive decision models.


Integration with Google Antigravity

Google supports using Gemini 3.8 Flash within Google Antigravity. In its developer documentation, Google also documents that the Antigravity agent in Gemini Managed Agents is built with Gemini 3.8 Flash by default.

Inference: Why Gemini 3.8 Flash Fits Agentic Coding

While the points above represent confirmed first-party integrations, our technical analysis suggests three operational reasons why 3.8 Flash is a strong candidate for coding agent loops:

  1. Iterative Error Recovery: Coding agents spend significant compute diagnosing build failures, syntax errors, and failing test suites. Gemini 3.8 Flash's gains on Terminal-Bench 2.1 (89.4%) and DeepSWE v1.1 (73.7%) indicate improved capability to inspect terminal output and apply corrections in follow-up turns.
  2. Inference Economics for High-Turn Sessions: Multi-turn coding sessions execute dozens of edits, inspections, and tool checks. At $0.75/M input and $3.75/M output ($1.50 and $7.50 in 2027), 3.8 Flash provides a substantially lower cost base than frontier reasoning models for high-frequency agent iteration.
  3. Context Caching for Codebases: Maintaining repository files, ASTs, and accumulated tool output in context benefits from prompt caching. Gemini's 4,096-token minimum caching threshold and $0.075/M cache-read rate ($0.15/M in 2027) help manage costs across long-running sessions.

Frequently Asked Questions

What is the exact API model identifier for Gemini 3.8 Flash?

The model ID is gemini-3.8-flash. In the Python google-genai SDK or REST endpoints, pass model="gemini-3.8-flash". Do not use version dates unless pinning a specific snapshot.

Does Gemini 3.8 Flash support the legacy thinking_budget parameter?

Google's migration documentation instructs developers to replace the legacy integer thinking_budget parameter with the thinking_level parameter ("low", "medium", or "high"). Passing thinking_level="minimal" is not supported on Gemini 3.8 Flash or Gemini 3.7 Flash and returns an INVALID_ARGUMENT (400) error. Supplying both parameters in the same request causes a validation error.

Why is Google doubling Gemini 3.8 Flash pricing in January 2027?

Google launched Gemini 3.8 Flash with introductory promotional pricing of $0.75/M input and $3.75/M output through December 31, 2026. Official documentation specifies that standard rates of $1.50/M input and $7.50/M output will take effect on January 1, 2027.

Can public developers use Gemini 3.8 Flash Cyber?

No. Gemini 3.8 Flash Cyber is restricted to accredited defenders and security researchers through Google's Fairwind Program. It is not accessible on the public Gemini API or Google AI Studio.

How does context caching work on Gemini 3.8 Flash?

Prompts containing at least 4,096 tokens can be cached explicitly or implicitly. Cached tokens are read at $0.075 per million tokens ($0.15/M in 2027), a 90% discount off base input pricing. Cache storage costs $0.50 per million tokens per hour ($1.00/M/hr in 2027).

Where should I read next?