Paid API key fails only in AI Studio — CountTokens / GenerateContent OPTIONS requests return 403

Google AI Studio consistently displays “An internal error has occurred” after I select a paid API key.

Reproduction:

  1. Open a new AI Studio chat.
  2. Select my paid API key.
  3. Send a short text prompt without attachments.
  4. The request fails with “An internal error has occurred.”

The issue affects multiple models and reproduces on both:

  • Desktop browser
  • Mobile AI Studio web app over cellular data, independently of the desktop network

The API project has an available balance. The same API key works successfully in Paratranz, so the failure appears specific to AI Studio.

HAR findings:

  • Host: alkalimakersuite-pa.clients6.googlecom
  • CountTokens: OPTIONS preflight returns HTTP 403
  • GenerateContent: OPTIONS preflight returns HTTP 403
  • The GenerateContent POST fails with net::ERR_FAILED and no HTTP response.
  • The preflight requests include x-aistudio-user-api-key in Access-Control-Request-Headers.

Please investigate why AI Studio’s CORS preflight requests are being rejected when a paid API key is selected. I can provide a sanitized HAR through a private support channel if needed.

I am encountering the EXACT same issue, and HAR inspect found same conditions.

Same project and paid API key migrated to pre-pay billing a few days ago, except it had been working in the interim.

Seems like a recent frontend patch may have broken the authentication for migrated accounts.

I am getting the same errors. “An internal error has occurred.” whole morning, Central Europe

same, count token failed when uploading attachment
“an internal error has occured” when using api key

this has been going on for hours btw, and the site still says “all systems operational” … sure lol

Thanks for the reports. I’ve raised this as a P0, hopefully we’ll get it resolved soon.

This has been happening for hours.

This is not the first time this exact type of error has been happening with Google AI Studio when paid API keys are linked… Google should be able to get its basic AI services in a stable situation

Thanks again all, this is now fixed.