The Jev model is now integrated and live · Welcome to try it
Blog
Cost control

Gemini 3.8 Flash API Pricing and Agent Cost

Google's introductory rate is $0.75 input and $3.75 output per million tokens; OmniaKey currently lists $0.45 and $2.25, but retries and thinking decide the cost of an accepted result.

11 min readOmniaKey
Gemini 3.8 FlashAPI pricingagent costthinking tokenscost control

Gemini 3.8 Flash API pricing is $0.75 per million input tokens and $3.75 per million output tokens on Google's paid Standard API through December 31, 2026. Google lists $1.50 input and $7.50 output from January 1, 2027. The OmniaKey model page currently quotes $0.45 input, $2.25 output, and $0.045 cached input per million tokens.

The direct figures and dates above come from Google's live Gemini API pricing table.

Those rates answer what one token bucket costs. An agent budget needs a different number: total spend divided by tasks that pass the acceptance check. A cheap request that fails twice can cost more than a dearer request that passes once.

Fact-checked September 20, 2026. Google prices, dates, token limits, thinking levels, caching, and Batch behavior were checked against current Google documentation. The OmniaKey figures were checked against the live catalog and are a separate gateway quote. This is research-based cost analysis; we did not run a first-hand benchmark or billable production test, and no success-rate claim is made for the model.

Gemini 3.8 Flash API prices at a glance

All figures below are USD per one million tokens. "Cached input" is the lower read rate, not Google's separate cache-storage charge.

Billing pathInputCached inputOutput, including thinkingScope
Google Standard through Dec. 31, 2026$0.75$0.075$3.75Direct paid Gemini API
Google Batch or Flex through Dec. 31, 2026$0.375$0.0375$1.875Direct, eligible delayed or flexible work
Google Priority through Dec. 31, 2026$1.35$0.135$6.75Direct priority processing
Google Standard from Jan. 1, 2027$1.50$0.15$7.50Scheduled direct Standard rate
OmniaKey current catalog$0.45$0.045$2.25Current gateway Standard quote

The current OmniaKey quote is 40% below Google's current Standard token rates. It is not a promise to stay at 60% of Google pricing after January 1. OmniaKey controls its own catalog, while Google controls the direct rate card. Recheck the live pricing table before approving a production budget.

Google's Batch and Flex prices are lower than the current OmniaKey Standard quote, but they are not the same product surface. Batch is asynchronous, has a target turnaround of 24 hours, and Google documents it for generateContent. Do not assume that Google's Batch, Flex, or Priority modes exist on a gateway route unless that route documents them.

Google also lists cache storage and grounding as separate charges. Tool providers, browsers, databases, hosting, taxes, and human review may add costs that are absent from a token table.

Calculate cost per accepted agent task

Start with the route, not the model name:

text
model cost per attempt
  = input millions x input rate
  + cached-input millions x cached-input rate
  + output millions x output rate

all-in attempt cost
  = model cost + tools + grounding + infrastructure + review

observed cost per accepted task
  = total spend across successful and failed attempts
  / number of tasks that passed the acceptance check

For a forecast where every attempt has roughly the same cost and an independent probability of passing:

text
expected cost per accepted task = cost per attempt / pass rate

That last shortcut is an estimate. Failed runs can stop early, loop longer, call different tools, or trigger human repair. Production reporting should use total observed spend in the numerator.

Define "accepted" before the test. It might mean a patch passes unit tests, a JSON object validates against its schema, an extraction matches reviewed labels, or a support answer passes a human rubric. HTTP 200 is not an acceptance test.

Worked example: 20K input, 5K output, 70% pass rate

Assume each full attempt consumes 20,000 uncached input tokens and 5,000 output tokens. The output bucket includes provider-billed thinking tokens. Exclude tools, cache storage, taxes, and human review so the token math stays reproducible.

Billing pathCost per attemptExpected cost per accepted task at 70%
Google Standard through 20260.02 x $0.75 + 0.005 x $3.75 = $0.03375$0.0482
Google Standard from 20270.02 x $1.50 + 0.005 x $7.50 = $0.06750$0.0964
Google Batch/Flex through 20260.02 x $0.375 + 0.005 x $1.875 = $0.016875$0.0241
OmniaKey current catalog0.02 x $0.45 + 0.005 x $2.25 = $0.02025$0.0289

The direct Standard price doubles in this fixed-token example on January 1, 2027. The OmniaKey row uses only the current catalog quote; it does not forecast a future gateway price. The Batch/Flex row shows why the consumption mode must be part of a comparison: a delayed direct job can have a lower token bill than an interactive gateway request.

At the current Google Standard rate, the same $0.03375 attempt costs $0.0375 per accepted task at a 90% pass rate, $0.0482 at 70%, and $0.0675 at 50%. Improving the pass rate can matter more than trimming a small prompt.

Thinking tokens can dominate the output bill

Google documents low, medium, and high thinking levels for gemini-3.8-flash; the default is medium. The minimal level is not supported and returns an error. Output pricing covers both visible response tokens and thinking tokens.

The current model page lists a 1,048,576-token input limit and a 65,536-token output limit. Those are capacity ceilings, not free allowances; every billed token still belongs in the task numerator.

This changes cost control in three ways:

  1. A short visible answer can still have a large output bill if the model reasons for many tokens.
  2. A small max_output_tokens value can stop the response while it is still reasoning, return an incomplete or empty result, and still bill generated thinking tokens.
  3. high is economical only when its additional reasoning raises the accepted-task rate enough to offset extra output and latency.

Test low, medium, and high on the same task set. Keep the prompt, tools, permissions, retry policy, and acceptance commands fixed. Choose the lowest level that meets the required acceptance rate, not the lowest level that merely returns text.

Caching, retries, and tools belong in the same budget

Google documents implicit caching for Gemini 3.8 Flash with a 4,096-token minimum eligible prefix. Put stable instructions and tool schemas before changing task data when your client preserves that prefix, then verify the provider-reported cache usage. Similar text is not proof of a cache hit.

Retries deserve their own reason code. Separate transient transport errors, invalid tool arguments, failed acceptance checks, and human-requested revisions. An unbounded retry loop makes the denominator look better while silently expanding the numerator.

For tool-using agents, record at least:

  • requested and returned model ID;
  • input, cached input, thinking, and visible output usage when the active protocol exposes them;
  • tool names, tool charges, and number of turns;
  • latency, error category, and retry count;
  • acceptance result and the exact check that produced it;
  • final billed amount for the route.

The Gemini native and OpenAI-compatible protocols may expose different usage field names. Reconcile the fields returned by the actual route with the OmniaKey usage dashboard instead of assuming one provider schema.

When to use Google direct or OmniaKey

RequirementStart withWhy
Lowest listed rate for delay-tolerant bulk workGoogle BatchCurrent direct Batch rates are 50% of Standard; jobs are asynchronous
Google-specific grounding or consumption controlsGoogle directThe direct contract documents those Google surfaces
One key and an OpenAI-compatible routeOmniaKeyCurrent catalog exposes gemini-3.8-flash with a separate gateway quote
Interactive agent with strict latency needsMeasure bothToken rate alone does not establish queue time, reliability, or pass rate
Production route after Jan. 1, 2027Recheck bothGoogle's Standard change is scheduled; the future gateway quote is unknown

This is not a universal winner table. Data policy, regional availability, rate limits, support, routing transparency, and the client protocol can change the decision even when the arithmetic favors one line.

Call Gemini 3.8 Flash through OmniaKey

Confirm that gemini-3.8-flash is present in the live model catalog, create a scoped credential in API keys, and use the OpenAI-compatible endpoint:

bash
curl https://api.omniakey.com/v1/chat/completions \
  -H "Authorization: Bearer $OMNIAKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.8-flash",
    "messages": [
      {"role": "user", "content": "Return the riskiest assumption in this rollout plan."}
    ],
    "stream": true
  }'

The API quick start covers authentication and base URLs. Use an environment variable, never a real key in source, prompts, benchmark logs, or screenshots.

Frequently asked questions

How much does the Gemini 3.8 Flash API cost?

Google's paid Standard rate is $0.75 per million input tokens and $3.75 per million output tokens through December 31, 2026. It lists $1.50 and $7.50 from January 1, 2027. OmniaKey currently lists a separate gateway quote of $0.45 input and $2.25 output.

Are thinking tokens included in the output price?

Yes. Google states that output pricing includes thinking tokens. Budget from provider usage, not visible answer length.

Is OmniaKey always cheaper than Google direct?

No. The current OmniaKey Standard quote is below Google's current Standard rate, while Google's current Batch and Flex rates are lower for eligible workloads. Availability, latency, protocol, and future prices are separate decisions.

Why divide cost by the pass rate?

Failed attempts consume money without adding an accepted result. Dividing a stable per-attempt forecast by pass probability estimates the spend behind one accepted task. Use total observed spend divided by accepted tasks once production data exists.

Which thinking level should an agent use?

Start with low for bounded, checkable work, then test medium and high where failures are costly. Gemini 3.8 Flash does not support minimal. The right level is the least expensive one that passes the same acceptance gate reliably.

Primary sources

Evidence and calculations were checked on September 20, 2026. Prices, model limits, route availability, and provider behavior can change. Recheck the primary rate card and the live OmniaKey catalog before committing production spend.