Not able to load Set up Billing popup in Google AI Studio.. Content Security Policy (CSP) error

Adding 2FA, then trying to set billing via AI Studio and it worked. Thanks for the tip!

Hi guys, I’m facing the same problem. Tried @Keith_Leith’s way to test it on Safari (Thanks Keith), it worked! (try to wait 5-10 seconds)
Make sure your Safari is up to date.

Thanks for the help with the workarounds, everyone! We’re working on it.

Hey everyone — here’s what worked for me:

First, make sure you have a Google Cloud account with two-factor authentication (2FA) enabled and billing properly set up. Once that’s done, try setting up billing again in AI Studio. That seemed to resolve the issue for me.

Same here. Turned on Google Cloud Acnt w/ 2FA turned on. Set up billing within Cloud, went back into Ai Studio, still get the spinning wheel. Still says I’m on Free Tier.

After trying all the things, I was able to get it to work by going to Google Cloud > Billing > Projects, and enabling billing from there for the specific Gemini project.

I am still encountering an error when trying to set up billing. The billing setup page loads briefly, but then I receive the following message: “Error during billing setup.”

I have confirmed that 2FA is enabled and have also tried accessing the page using Safari and Chrome in incognito mode, but the issue persists.

Please let me know if there is anything else I should try?

Yep. This worked for me. I wasn’t applying the correct billing acct to my particular Gemini project.

Got the same spinning on “setup billing” in AIStudio, and was able to find a workaround. The issue wasn’t 2FA at all (that’s been on for years), but rather that by default when you start using AIStudio AND you have a Google Cloud Platform account (w/ billing configured), that the AIStudio project will be created with billing disabled, and then doesn’t handle assigning a Billing Account from the cloud platform side.

If you go here: console..cloud.google.com/billing/projects
You’ll be able to see a list of your projects, and can change billing for your AI Studio project (either “Default Gemini Project” or project name)

Thanks for the discussion that got me going in the right direction! Lack of error messages to help the user in AIStudio is disappointing.

Hi Everyone! Just go to Googe Clouds Console, set up 2FA under billing (it should pop up like it did for me) once you click that, it’ll take you to another google screen, then enable 2FA, then TURN IT ON (you’ll see “turn on 2FA” after (read: under/below) all the green checkmarks. Then go back to your api tab, and click billing or set up billing again, wait the 5+ (this is important!) seconds everyone else is saying tto do, and the pop up should go from spinner, to darker black page, to you seeing your gmail and face and it asking you if you wanted to set up billing. Aaaand… now we’re here. Try that, and see what you get. I should also mention that before that, I also upgraded my chrome browser which was long overdue. Let us know what you got, and good lluck to everyone else!

This is the case for me. Thank you!

Same issue happened to me.

Same issue here. Running out of free credits, want to install a paid API but failed. Can´t work on the project.

Same issue here fresh incognito window.

after i went to google cloud console and got this (screenshot) and enabled 2FA the issue is gone. The CSP errors seem to be completely unrelated to this as they still appear even when the pop up loads in successfully.

Thak you! This is the solution.

anyone seeing this now and still has this issue, it worked for me instantly after turning on 2FA on my google account :slight_smile:

Got the same error and after contact the Billing-AI-Chatbot this is the solution for us:

  1. Go to https://console.cloud.google.com and sign in with the same account as the AI studio
  2. Search in the sidebar to IAM & Admin
  3. In the bottom, there is a smal button ‘Manage resources’
  4. In this view all projects / elements are visible. Search for the project you’ve made in the AI studio
  5. Select under actions the ‘billing’ option and select your billing account.
  6. Done! It’s visible in the AI studio :slight_smile:

Same issue here, all my projects on AI Studio has linked billing account, but when I click on change to pre-pay it returns error