gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

MAJOR BILLING ISSUE when using the pro model with API key

Open RonnieShawDeveloper opened this issue 1 year ago • 3 comments

What happened?

So - it appears the CLI - when using the API Key, and using gemini-2.5-pro will run up a bill very quickly - and the user (you) will not know it until you get an email like I did this morning telling me that my account has exceeded my threshold of $100 and you wake up to a $140 bill.

Image

On the 16th, I switch from using my Google account to the API and started using PRO - you can not use PRO without doing this, because the CLI will switch you from pro to flash if you are only using a Google Account. Now - I can see why. On the 16th and 17th, I was using it to prepare for a tutorial I was going to make on using Gemini CLI and how to set it up. On the 18th, I started prepping for the tutorial because I intended on creating it this weekend, and I used Gemini CLI in a large project that I built and maintain. I had it scan the entire project and look for different thing. And the, I had it build an entire Weather Website using the National Weather Service API and it did a great job. It was very good about finding and updating UI, creating services and models - it is truly a thinking model! I spent a few hours with it, basically seeing what it could do so I could be ready to use it in this tutorial. Unknowing to me - I was running up a huge bill!

What did you expect to happen?

I expected that I was well within the free use of the API rates! I was well under the 1000 requests, and had no idea that the CLI had used 100,000,000 input tokens!!!! Yes, 100 MILLION!!! So, I woke up this morning with a bill and seeing to my surprise that Google took $100 from my credit card and I still have a balance of $40!!! And I didnt do anything that a common developer would not do while using it!

Client information

Well, I dont have any stats to show - because I had no idea that I was running up a huge bill! I am just happy I stopped when I did! But, here are my settings:

Windows 11 Pro Git Bash environment that I run Gemini CLI from Used it inside of Webstorm IDE

Login information

Used my Google API key - it appears that when I was using my Google Account, with the flash model - I was getting billed 15 cents to 34 cents per day... but when I switch to the API key and pro, the costs went up by a huge amount. I have removed the API key and will now be using my Google Account and it will kick me down from Pro to Flash within the first 10 turns - and I can now see why. Pro uses a huge amount of Input Tokens because it is a thinking model, and it thinks about your credit card and the bill that it will run up quickly.

Anything else we need to know?

I already have this in the discussions area of this repo. I will have to contact google billing on Monday and see if I can get this adjusted because I do not mind paying for services that I knowingly use - but when you think you are well within the free use rates and limits and then find out the product over exceeds those limits just with regular use - well, that needs to be adjusted. I have 5 Google billing accounts, and I know what I will be spending on each one each month. Gemini CLI is a powerful tool, but the way it is setup causes a HUGE billing issue!

RonnieShawDeveloper avatar Jul 19 '25 14:07 RonnieShawDeveloper

For fellow occasional Issues stalkers, see for now my informal advice: https://github.com/google-gemini/gemini-cli/discussions/4472#discussioncomment-13817469

Manamama avatar Jul 19 '25 15:07 Manamama

Same thing just happened to me. In just one heavy day of gemini-cli usage I managed to rack up a $145 bill. The sad thing is I thought I was authenticated with my personal account (i.e. was on the free tier) and I didn't realize it had actually been using my token for authorization. Yikes!

---Session 1:

Agent powering down. Goodbye! │ │ │ │ Interaction Summary │ │ Tool Calls: 123 ( ✔ 121 ✖ 2 ) │ │ Success Rate: 98.4% │ │ User Agreement: 90.9% (11 reviewed) │ │ │ │ Performance │ │ Wall Time: 4h 5m 1s │ │ Agent Active: 1h 12m 51s │ │ » API Time: 28m 33s (39.2%) │ │ » Tool Time: 44m 17s (60.8%) │ │ │ │ │ │ Model Usage Reqs Input Tokens Output Tokens │ │ ─────────────────────────────────────────────────────────────── │ │ gemini-2.5-pro 144 36,674,810 56,431 │ │ │ │ Savings Highlight: 26,979,720 (73.6%) of input tokens were served from the cache, reducing │ │ costs.

--- Session 2:

Agent powering down. Goodbye! │ │ │ │ Interaction Summary │ │ Tool Calls: 153 ( ✔ 150 ✖ 3 ) │ │ Success Rate: 98.0% │ │ User Agreement: 88.2% (17 reviewed) │ │ │ │ Performance │ │ Wall Time: 5h 18m 36s │ │ Agent Active: 46m 8s │ │ » API Time: 29m 37s (64.2%) │ │ » Tool Time: 16m 31s (35.8%) │ │ │ │ │ │ Model Usage Reqs Input Tokens Output Tokens │ │ ─────────────────────────────────────────────────────────────── │ │ gemini-2.5-pro 162 48,948,598 81,005 │ │ │ │ Savings Highlight: 39,536,862 (80.8%) of input tokens were served from the cache, reducing │ │ costs. │ │ │ │ » Tip: For a full token breakdown, run /stats model. │ │

jms90h5 avatar Jul 24 '25 03:07 jms90h5

Found possible duplicate issues:

  • #3004: (#0.9394924920646103)
  • #3299: (#0.9244270965798456)
  • #2479: (#0.9113447070121765)
  • #2773: (#0.9105736070529473)
  • #2094: (#0.9076000452041626)

gsquared94 avatar Jul 30 '25 00:07 gsquared94