Why can the Gemini API in batching go into a negative balance?

Good day, I feel like a similar topic must already exist, but I feel hurt and offended by Google over what seems like pure greed.

Here’s the situation:

  1. For the sake of testing Gemini API batching, I topped up my account with 10 euros.

  2. I asked a Gemini agent to create a script processing batching.

  3. I ran the script, knowing that I had 10 euros available on my account to operate with.

  4. In the evening, after logging into my account, I saw a bill for minus 70 euros for allegedly used tokens.

As it turned out, Gemini wrote the script correctly, but it used the Gemini 3.5-flash model and did not turn off thinking/reasoning, which ultimately led to a huge token count inflation.

Google, on the other hand, writes:

Please note that the usage-based APIs meter and report telemetry asynchronously. When a massive data volume (such as 17 million tokens) is processed quickly via a batch job, there is a natural propagation delay before the usage records are fully processed, aggregated, and reflected against your account balance in real time

But I didn’t need those 17 million tokens. All I needed was to spend 10 euros, not go 70 euros into the negative… I’m trying to make my own app, but at the moment I’m a student and a migrant in another country due to the war, and I don’t have these 70 euros, ahahaha

At the same time, Google writes:

“We recognize this is not the outcome you were hoping for, and we sincerely apologize for the difficulty this places on you. To prevent similar issues in future development work, we strongly recommend implementing strict budget alerts and spending caps within your Google Cloud project settings.”

It feels like a slap in the face-on one hand, they tell you to set up your spending cap, and on the other, they say they can’t calculate tokens on their side. Lol, what?:slight_smile: In today’s world of neural networks, you can’t calculate token costs?

Has anyone encountered a similar situation? Can anyone help with advice or just offer some support? Because I’m feeling really frustrated and upset…

And here are the Usage figures that aistudio.google shows

And in general, I don’t understand where the figure of 17 million came from if I don’t see these numbers in my personal account?

​I completely understand your frustration with that unexpected bill. I took a look into the usage telemetry and batch processing behavior, and here is exactly why that 17 million token spike happened and how you can fix it.

​Why You Saw 17 Million Tokens

​Thinking and Reasoning Tokens: With the rollout of Gemini 3.5 and Gemini 3.6 models, Google introduced internal thinking loops. When your batch script ran, the model generated millions of invisible reasoning tokens before delivering its final output text. Google counts these internal thinking tokens as output tokens, which are billed at full output rates.

​Batch Volume Multiplication: Running hundreds of prompts in a batch job multiplies those reasoning tokens across every single prompt. A small input file can easily balloon into millions of output tokens.

​Dashboard Isolation and Telemetry Lag: Asynchronous batch jobs (batches.create) do not display on the interactive API chart at the top of Google AI Studio. Additionally, batch usage telemetry reports with a delay of up to 10 minutes. By the time the metering system registered the total token volume, the job finished and pulled your balance into the negative.

​How to Fix This and Prevent It Moving Forward

​Disable Thinking Tokens in Your Script: When configuring batch payloads for Gemini 3.6 models, set an explicit thinking_budget or cap your output parameters in your script to prevent runaway reasoning loops.

​Pre-Calculate Tokens: Always run your input files through the countTokens endpoint before submitting a batch job to calculate your exact input footprint.

​Set Hard Spend Caps: In your Google Cloud Console Billing settings, set a strict monthly spend cap and auto-reload limit so background jobs can never exceed your budget.

​Once you purchase Prepay credits to clear the negative balance, your API keys will automatically reactivate.

Hi, Please note that if you accrue a large volume of requests (as is the case with the batch requests you made) in a very short period of time, it may lead to certain negative wallet balance proportionate to your project tier because it takes a few minutes before our systems start blocking your API calls due to insufficient wallet balance.