Skip to main content

Buyer guide

Gemini API Spend Controls Checklist

How Prepay, tier caps, project caps, and key restrictions stop requests or fail to stop them.

Reading time
2 min read
Sources
10 cited
In this piece
Gemini API0 Mixed

Google's billing data trails usage by about 10 minutes, long enough for a batch job or agent session to overshoot a project cap. Set a project spend cap below your tier's monthly cap, restrict every key to the Gemini API, and size unattended jobs for that lag. A Prepay balance, the tier cap, and project caps each stop spending at a different level.

When you need this

  • Keys sit in apps, CI, or agent configurations that more than one person can reach.
  • Agents or batch jobs run unattended.
  • Finance asks for spend per product, or a bill arrives that nobody can explain.

Evaluation criteria

  1. Prepay balance

    What happens when the credit balance reaches zero?

    Look forAuto-reload with a monthly auto-charge limit, or alerts before the balance reaches zero. At US$0, every key on the Prepay billing account fails with HTTP 402 until credits arrive.

  2. Tier cap and project caps

    Is a project spend cap set below the billing account's monthly cap?

    Look forExperimental AI Studio project caps set below the tier cap. Tier 1 allows US$250, Tier 2 US$2,000, and Tier 3 US$20,000 to US$100,000 or more. Reaching the tier cap pauses every linked project until next month. On Google's developer forum, teams report spend-cap 429s that continued after they removed the cap, and one production app stayed down for 2 days.

  3. Billing lag

    Can a job outrun your cap before billing catches up?

    Look forBatch jobs and agent sessions sized for the lag. Google states that both can run past a project cap while billing data lags. One builder's AI Studio balance went from US$10 to minus US$160 overnight.

  4. Key hygiene

    Is every key restricted, owned, and rotated?

    Look forKeys restricted to the Gemini API, kept out of client code, and deleted when unused. One hobbyist reports a US$17,000 bill after a leaked key or compromised machine drove usage on a project idle for over a year.

  5. Cost per task

    Do you budget per completed task, including thinking and cached tokens?

    Look forThinking, cached, and tool tokens logged per call, plus the model that answered. Thinking tokens bill as output. Google routes some retired Flash versions, such as gemini-3.7-flash, to their successors automatically, so log the model that answered and check which model's rate the bill applies.

  6. Price changes

    Does your budget include the January 1, 2027 price change?

    Look forGemini 3.8 Flash at US$0.75 and US$3.75 per million tokens through December 31, 2026, and US$1.50 and US$7.50 after, with caching and storage prices rising on the same date.

Questions to ask vendors

  1. Which billing account does each project use, and is it on Prepay or Postpay?
  2. Who receives budget alerts, and how long after spend do they arrive?
  3. Which keys exist in our organization, and who owns each one?

Red flags

  • Keys with no API restrictions, or keys in browser or mobile code.
  • Production and experiments on one billing account, so one depleted balance stops both.
  • Budget alerts treated as caps.
  • Batch jobs launched without an output-length limit.

Products in this piece

Sources

Official documentation
5
Public source
5
  1. Gemini API docs: BillingOfficial documentationai.google.dev
  2. Gemini API docs: Rate limitsOfficial documentationai.google.dev
  3. Gemini API docs: Gemini Developer API pricingOfficial documentationai.google.dev
  4. Gemini API docs: Using Gemini API keysOfficial documentationai.google.dev
  5. Gemini API docs: Troubleshooting guideOfficial documentationai.google.dev
  6. Google AI Developers Forum: Production down for 2 days after spend cap removal (Apr 13, 2026)Public sourcediscuss.ai.google.dev
  7. Google AI Developers Forum: Urgent, 429 in production, nowhere near spend cap (May 31, 2026)Public sourcediscuss.ai.google.dev
  8. Hacker News comment on an AI Studio balance at minus US$160 (Oct 4, 2026)Public sourcenews.ycombinator.com
  9. Hacker News comment on a US$17,000 bill from a leaked key (Apr 13, 2026)Public sourcenews.ycombinator.com
  10. Hacker News comment on billing alert delays at a bootstrapped company (Mar 3, 2026)Public sourcenews.ycombinator.com