GuidesOneMux

Gemini 4 Neon API Cost Estimates for Repository Changes

Estimate the API cost of repository code changes and test-verification loops with explicit token, cache, and retry assumptions.

AI

Summary · TL;DR

An illustrative 25-turn repository-change task costs $1.91625 at the supplied Google Standard rates, or an estimated $0.72243 at the published OneMux rates if the same token categories and cache-read treatment apply. Actual cost depends on usage, cache hits, verification outcomes, and billing terms.

Key Takeaways

  • Count every model call in the change-and-test loop, including retries and test-result analysis.
  • Output estimates must include thinking tokens, not just the visible patch and explanation.
  • Treat cached tokens as a subset of input, not additional input, and verify how the provider reports cache usage.
  • Compare cost per accepted change as well as cost per attempt; failed attempts still incur charges.
  • OneMux cache-write treatment and other tier conditions should be verified before applying the illustrative estimate.
On this page (9)

The estimate to use first

For a repository change that takes 25 model turns, assume 1.5 million total input tokens, 1.275 million of them cache reads, and 70,000 output tokens including thinking. At the supplied Google Standard rates, the estimated API cost is $1.91625 per attempt. Applying the published OneMux input, cache-read, and output prices to those same categories gives $0.72243 per attempt, rounded to five decimal places.

These are illustrative calculations, not measured Gemini 4 Neon runs. They exclude charges outside the stated token categories and assume the cache-read prices apply to all tokens counted as hits. In particular, verify OneMux billing categories and any additional charges before using the second figure as a budget commitment. OneMux is the publisher of this guide and offers access to models through an OpenAI-compatible API.

Gemini 4 Neon prices and comparable units

The following is the supplied OneMux catalogue snapshot captured November 27, 2026. Prices are USD per 1 million tokens. The official input and output figures match the Google Standard prices reported in Ofox’s Gemini 4 Neon pricing guide, which says it checked Google’s pricing on November 19, 2026. Check current prices and terms before committing a budget.

ModelOfficial inputOfficial outputOneMux inputOneMux outputPublished OneMux-to-official price ratio
Gemini 4 Neon$3.00$15.00$1.131$5.6550.377

The published ratio is a price ratio, not a 0.377% discount: the listed OneMux input and output prices are 37.7% of the respective official prices. That does not establish the same ratio for every invoice or service tier.

Input cache categoryOfficial price per 1M tokensOneMux published price per 1M tokensHow to use it here
Cache read$0.15$0.05655Apply only to tokens actually reported as cache reads.
Cache write$0.15$0.05655Catalogue values; do not add them to the example without confirming what they represent and how they are billed.

The source describes Neon’s Google cache as implicit and says new prompt tokens are billed at the ordinary input rate. The catalogue also lists a cache-write price, but the supplied information does not establish that the two providers classify cache writes identically. The worked comparison therefore assumes only ordinary input, confirmed cache reads, and output; it does not assume a separate cache-write charge.

Google’s Standard, Batch, Flex, and Priority rates differ. Ofox reports Batch and Flex token rates at half Standard and Priority at 1.8 times Standard; availability and operational tradeoffs require checking the relevant provider terms. The OneMux catalogue snapshot does not specify corresponding tiers. See the OneMux Neon model page for current published details.

Worked example: change code, run tests, inspect failures

Imagine an agent receives a bounded repository task: modify a function, update its tests, run the relevant test suite, inspect a failure, revise the patch, and summarize the final result. The following counts are assumptions across all 25 model calls, not a claim that this workflow needs exactly 25 turns:

  • Total input: 1,500,000 tokens, including repository excerpts, instructions, conversation history, and test output sent back to the model.
  • Confirmed cached input: 1,275,000 tokens, or 85% of total input. The remaining 225,000 tokens are uncached.
  • Total output: 70,000 tokens, including visible text, generated code, and thinking tokens.
  • No separately billed search or other tools; no separate cache-write charge in this example.
  • One attempt; no human review, local compute, CI, tax, or other non-token costs included.

A cumulative 1.5 million input tokens across calls is not a claim that any single request fits that amount. The source describes a 1,048,576-token context window shared by input, thinking, and output; check each request, not just the task total.

Cost componentCalculation at Google Standard ratesCost
Uncached input225,000 × $3.00 / 1,000,000$0.67500
Cache reads1,275,000 × $0.15 / 1,000,000$0.19125
Output, including thinking70,000 × $15.00 / 1,000,000$1.05000
Total per attemptSum of the three rows$1.91625

On the same assumed token counts, the OneMux calculation is $0.254475 for uncached input, $0.07210125 for cache reads, and $0.39585 for output: $0.72242625, or approximately $0.72243. This is an arithmetic comparison of published rates, not a measured invoice or a guarantee that cache accounting is identical.

What changes the estimate?

If output including thinking doubles to 140,000 tokens while input stays unchanged, the Google Standard total rises to $2.96625. Thinking level can therefore matter even though the output price per token stays the same. Ofox reports that thinking tokens are billed as output and that higher thinking levels used more output tokens on the third-party tasks it cites. Those benchmark tasks are not a forecast for your repository.

Cache assumptions matter too. If none of the 1.5 million input tokens hit the cache, the original 70,000-output-token attempt costs $5.55 at Google Standard rates. A repeated repository prefix is not proof of a cache hit: use reported usage rather than assuming the 85% example applies.

Budget for accepted changes, not just attempts

A test run is useful evidence, but it is not automatically acceptance: define the required tests, review checks, and any integration checks before counting a change as complete. Include model calls that inspect failed tests or try a different patch. If tests run locally and their output is never sent to the model, that execution itself is outside the API token estimate; CI and compute may still cost money separately.

For a simple planning scenario, suppose each attempt costs the same $1.91625 and 80% of attempts independently produce an accepted change. Dividing by 0.8 gives an expected $2.39531 per accepted change. At the illustrative OneMux rate, the same calculation gives approximately $0.90303. These are planning assumptions, not observed success rates. Attempts can vary in length, and repeated failures may be correlated, so track actual totals as well.

At 100 attempts with the original token profile, the token estimates are $191.625 at Google Standard and approximately $72.24263 using the OneMux prices and cache assumptions above. One hundred accepted changes may require more than 100 attempts.

A repeatable measurement checklist

  1. Set the boundary. Record a task ID and acceptance criteria for each requested repository change. Include failed and abandoned attempts in the ledger.
  2. Capture every model call. Save total input, confirmed cache-read input, and output including thinking, using the provider’s usage definitions. Check whether reported input already includes cached tokens.
  3. Keep test evidence separate. Record commands, exit status, and which test output was returned to the model. Sending large logs back increases input; omitting relevant failures can make the next decision less useful.
  4. Price without double counting. Subtract cache reads from total input before applying the ordinary input price. Apply the cache-read price only to the confirmed subset, then add output and any separately billed services.
  5. Review exceptions. Check for cache-write charges, tier differences, search queries, truncation, missing thinking-token usage, and changes in provider pricing. Unknown charges are not zero.
  6. Report both denominators. Divide total spend by attempts and by accepted changes. Segment results by task size and thinking setting before drawing conclusions.

Conclusion

Start with the $1.91625 Google Standard example as a transparent token-budget template, not a promise about your workload. Replace its assumed counts with usage from real change-and-test loops, verify cache and tier treatment, and judge the result by cost per accepted change as well as per attempt.

Sources

Published price snapshot

Captured 2026-11-27T14:00:09.818Z from the OneMux published catalogue. Prices retain website billing units; this is not a live benchmark. Tiered, cached or time-based billing may differ. Unknown values are not zero.

ModelOfficial inputOfficial outputOneMux inputOneMux outputPublished price ratio
Gemini 4 Neon$3$15$1.131$5.6550.377

Current OneMux prices. Compare workload costs only when input/output and billing units match; see each model page for tier conditions.

FAQ

Does Gemini 4 Neon charge for thinking tokens?

The supplied Ofox pricing guide says Google bills thinking tokens as output. Include them alongside visible output when estimating a task, and confirm how your provider reports usage.

Are repository tokens cached automatically?

The source describes Neon’s Google cache as implicit, but repeated text should not be assumed to hit it. Use the cache-read count reported for your requests and verify your provider’s billing treatment.

Why is cost per accepted change higher than cost per attempt?

Failed or rejected attempts still consume tokens. For example, if equally priced attempts independently succeed 80% of the time, expected token cost per accepted change is the cost per attempt divided by 0.8.

Related articles