AIREITER

Gemini 3.8 Flash API Pricing: Cost per Successful Agent Task

Последнее обновление: 2026-09-15 19:03:43

A Gemini 3.8 Flash agent can look inexpensive at $0.75 per million input tokens, but that is only the introductory rate. Google currently lists standard pricing at double those rates from January 1, 2027, while reasoning tokens and retries can raise cost per accepted task. Budget against the January rate and your success rate, not today’s token headline.

The pricing decision for agent builders

The relevant number is not cost per API call. It is cost per successful task: all model and tool spend divided by runs that pass your acceptance test.

Gemini 3.8 Flash is most defensible for difficult, multi-step work when extra reasoning prevents retries or improves accepted results. It is not the right default for every fixed-format extraction or simple classification route.

“if you're picking flash for agent loops, price the jan bill, not today's api page.” — Vraj (@vraj_ai), September 3, 2026

Gemini 3.8 Flash API pricing after January 1, 2027

Google’s Gemini API pricing documentation and model documentation list introductory rates through December 31, 2026. The standard rates begin January 1, 2027.

Billing modeInput through Dec. 31, 2026Output through Dec. 31, 2026Input from Jan. 1, 2027Output from Jan. 1, 2027
Standard$0.75 / 1M$3.75 / 1M$1.50 / 1M$7.50 / 1M
Batch$0.375 / 1M$1.875 / 1M$0.75 / 1M$3.75 / 1M
Flex$0.375 / 1M$1.875 / 1M$0.75 / 1M$3.75 / 1M
Priority$1.35 / 1M$6.75 / 1M$2.70 / 1M$13.50 / 1M
Cached input$0.075 / 1M$0.15 / 1M

These are token rates, not a complete agent invoice. Documented grounding, cache storage, external tools, hosting, and provider fees may add charges. Output billing includes thinking tokens, not just the visible answer.

Batch is the most useful budget lever for delay-tolerant work. After the change, post-change Batch pricing equals today’s Standard pricing, provided the workload qualifies and the API surface actually applies the Batch rate.

The cost-per-successful-task equation

Use four layers instead of one token multiplication:

  1. Model cost per attempt = (input tokens × input rate) + (output tokens × output rate).
  2. Attempt cost = model cost plus tool, grounding, storage, and infrastructure charges.
  3. Expected successful-task cost = attempt cost ÷ success probability.
  4. Observed successful-task cost = total spend ÷ accepted tasks.

For an agent loop, count every model turn and retry. If a run makes three calls before returning an answer, its input and output tokens are the sum of all three calls. Count thinking tokens inside output usage; Google exposes usage fields such as promptTokenCount, thoughtsTokenCount, and candidatesTokenCount in Gemini responses.

Worked example: 20,000 input tokens and 5,000 output tokens

Assume one complete attempt uses 20,000 input tokens and 5,000 output tokens. Ignore tool charges for this example.

PeriodCalculationCost per attemptAt 70% success, cost per successful task
Through Dec. 31, 20260.02 × $0.75 + 0.005 × $3.75$0.03375$0.0482
From Jan. 1, 20270.02 × $1.50 + 0.005 × $7.50$0.06750$0.0964

The rate change doubles the cost when token usage and success probability stay constant. If the agent retries once on some failures, the real average rises above this simple estimate because failed attempts consume tokens too.

The denominator matters. An agent that costs $0.05 per call but succeeds on half of runs costs $0.10 per accepted task before tool charges; a $0.08 call with 90% success costs about $0.0889 per accepted task.

Three budget scenarios that change the answer

Fixed-shape extraction

A PDF-to-JSON route with a stable schema usually has a clear acceptance test: required fields exist, types validate, and no extra prose appears. Start with low thinking and measure whether the task passes. Paying for high effort when validation already passes adds cost without increasing the denominator.

Google’s model documentation describes low, medium, and high thinking levels for Gemini 3.8 Flash; minimal is not supported. Treat thinking level as a route-level cost setting rather than a single application-wide default.

Long-context agent work

A coding or research agent may replay a large context across several turns, then generate additional reasoning and tool calls. Here, cached input, fewer retries, and a higher success rate can matter more than the nominal output rate.

For a long-running task, record context replay separately from fresh input. A 1-million-token context window does not make those tokens free. If the route is interactive, Standard or Priority may be appropriate; if it can run overnight, compare Batch or Flex against the time requirement.

Retry-heavy automation

Suppose a route costs $0.0675 per attempt after January 1 and succeeds 70% of the time. Assuming independent retries and no retry cap, expected attempts per success are approximately 1 ÷ 0.70 = 1.43, or about $0.0964 in model cost per accepted task.

If failures trigger expensive browser actions, search calls, or human review, add those costs to the numerator. An agent can be token-cheap and operationally expensive.

When Gemini 3.8 Flash still earns the premium

Use Gemini 3.8 Flash when the extra reasoning changes the outcome: fewer rejected patches, fewer failed tool sequences, better multi-step verification, or a higher acceptance rate on difficult tasks. Keep a cheaper route for repetitive transformations, routing, extraction, and other jobs whose acceptance tests already pass at low effort.

Independent figures reported by Artificial Analysis and summarized by Apidog put Gemini 3.8 Flash at about $0.58 per benchmark task in a high-thinking configuration versus about $0.40 for Gemini 3.7 Flash, with an Intelligence Index score of 59 versus 56. Those are benchmark-specific figures, not a universal invoice forecast; use them as evidence that token consumption can change the economics, not as a quote for your workload.

Community reports point in the same direction. Jan (@jan_volad) reported roughly 120 million output tokens for one Gemini 3.8 Flash comparison versus 29–35 million for competitors and described a blended task cost of $0.58; that is a user observation, not an independently audited production bill. The post is useful because it illustrates why a low per-million-token rate can overstate the savings.

A practical routing rule is:

  • Hard agent task: test Gemini 3.8 Flash at medium or high and measure accepted-task cost.
  • Routine task: test low first; retain the route only if its quality gate passes.
  • Delay-tolerant bulk work: compare Batch against Standard after January 1.
  • Any route with uncertain quality: do not optimize the token rate before measuring success probability.

Gemini 3.8 Flash pricing FAQ

Is Batch always cheaper?

Batch is cheaper on the listed rate card, but it is designed for workloads that can tolerate deferred processing. It is not a drop-in replacement for an interactive agent that must respond immediately.

How do I calculate cost per successful agent task?

Sum model, tool, grounding, and infrastructure charges for the run window, then divide by runs that pass your acceptance test. For a forecast, divide expected cost per attempt by estimated success probability and include expected retries.

The practical call: budget the route, not the model

Record input, thinking, visible output, tool turns, retries, latency, spend, and acceptance status by route. Test the relevant thinking levels, then project both the December and January rate cards.

The decision is straightforward: use Gemini 3.8 Flash where additional reasoning buys successful outcomes, use lower effort for work that already passes, and move eligible bulk jobs to Batch. The January 2027 rate change is currently scheduled in the published table; whether the model is economical depends on the tokens and failures behind each successful result.