Playground fails with "Failed to generate content / An internal error has occurred" whenever my own API key is linked — works unlinked, and requests never reach the Gemini API

Hello — looking for staff help with what appears to be an account-level block on AI Studio generation when a linked API key is used. I have bisected this as far as I can from the outside:

**Symptom**
Every Playground generation fails with “Failed to generate content. Please try again.” and the model turn shows “An internal error has occurred.” First observed Oct 29, 2026 (~8:07 PM CDT).

**What I tested**

  • Models: Gemini 4 Argon and Gemini 3.8 Flash — both fail identically.
  • Grounding on and off, different thinking levels — no change.
  • The linked key (“Thread Doctor”, ending …NVdQ, created Aug 22, 2026) in project “Default Gemini Project” (gen-lang-client-0008823..).
  • A brand-new key in the same project — same failure.
  • A brand-new project with a brand-new key (“Test Project”, gen-lang-client-0796726..) — same failure.
  • Prepaid balance on the account: had $10, added $20 more — no change.
  • **Unlinking the key entirely: generation works.** Re-linking any of my keys: fails again. Gemini AI Mode also works normally.
  • **Key restrictions verified in Cloud Console (Oct 29, 2026): all five keys across both projects are already restricted to “Gemini API”** — so this is not the unrestricted-key rejection. The same keys also work fine when applications call the Gemini API directly (e.g. a third-party app uses the “Thread Doctor” key against this project without problems). Only the Playground’s linked-key mode fails.

**What Cloud Console shows for the Default Gemini Project**

  • Gemini API status: Enabled.
  • Billing tier in AI Studio: Tier 2.
  • Traffic by response code (last 6 hours): only 200-series traffic; zero error-coded calls, and no API traffic at all at the times the Playground generations were failing.
  • AI Studio’s Logs page for the project: “No logs found” for these attempts.

In other words, the failed generations never arrive at the Gemini API as requests against my project — they appear to be rejected inside AI Studio when generation is attributed to my account via a linked key, while the unlinked (default) path works fine.

Could someone please check whether an account-level restriction is applied to my AI Studio account, and let me know how to clear or appeal it? Happy to provide any further details. Thank you.

Hi, I have the exact same issue occuring with nano banana 2.1, also when uploading medias it comeout it displayed token count failed,also I have around 160 under my balance. this also happened within last hour and never happened before

I’m also encountering errors when using a paid AI Studio Tier 3 key.
I get a CORS error when calling CountTokens and a 403 Forbidden error during the preflight phase.
I also get a CORS error when attempting to call GenerateContent, along with a 403 Forbidden error during the preflight phase.

When I asked argon, they explained that when using a paid key, the new headers x-aistudio-quota-tier, x-aistudio-user-api-key, and x-aistudio-visit-id
are not registered in the CORS whitelist, so the request itself is blocked. Is this the correct explanation for the issue?

Update from the same evening (Oct 29, 2026): direct API calls verified working — from another machine, a separate restricted key in the same project listed models and completed a generateContent call on gemini-4-argon (HTTP 200), and the third-party app that uses the “Thread Doctor” key ran its AI analysis successfully. Only the Playground’s linked-key mode fails.

Confirmed APi key works on agent mode doesnt works in google playground. Looks like infra problem

I have the same problem. It only returns with the error if I link a paid key

AN INTERNAL ERROR OCCURRED

Same problem from today

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

Thanks for the reports! We’ve just pushed a fix & I can confirm everything is back to normal.