Solution for "Your prepayment credits are depleted" in Android Studio

I have AI Pro. But when using Android Studio I quickly hit a limit when asking Gemini for help.
When I go to https://ai.studio/projects I see that I have zero credits and it thinks I paid nothing.
The problem is that Android Studio is using my free AIStudio key and not my paid AI Pro key.
You need to remove the free key so it uses the paid key.

The fix was to:

  1. Open the Agents window.
  2. Click on the model menu in the bottom right. It may say “Default”, then select “Manage Models…”.
  3. There are two tabs: “Gemini” and “Google AI Studio”. Select Gemini.
  4. Verify that you have “Current plan: AI Pro” or whatever you paid for.
  5. Now select the Google AI Studio" tab.
  6. If you see an “API key” just delete it. That is a bad key for the free plan that is overriding your paid plan.
  7. Click OK
  8. Restart Android Studio

Now you should have the correct quotas from your paid plan.