Intermittent permission denied on every model even with a properly set up project

been fighting this one for a while and figured i’d write up everything instead of another “it doesn’t work” post, since most threads about this die at “clear your cache” and that does nothing.

symptom is the playground shows “An internal error has occurred” in the chat and a toast that says “Failed to generate content: permission denied. Please try again.”

here’s what i went through, in order.

first thing i found was that i’d never accepted the google cloud terms of service. the welcome dialog was just sitting there unaccepted, which meant my account had zero cloud projects. i had no idea ai studio needed one even for the free browser chat. accepted the terms.

then i made a project manually from the cloud console, because ai studio’s own project creation had never worked for me.

enabled the gemini api on it, generativelanguage.googleapis.com.

went back to ai studio and hit “create api key”. nothing happens. no dialog, no error, not even a network request fires. same deal with “import projects”, the button is just dead.

so i went to cloud console credentials instead, and this is the interesting part. gemini api keys now have to be bound to a service account. the gemini api entry in the api restrictions list is greyed out and unselectable until you tick “authenticate api calls through a service account” and pick one, then it lights up. that has to be why the ai studio button does nothing, it can’t do the binding.

made a service account, made an api key bound to it, restricted to gemini api. that part finally worked.

tried to link the key in the playground and it says “link a paid api key here”, so a free tier key can’t go in that slot.

after all that i went from failing every single time to failing maybe three out of four. so something definitely got fixed, just not all of it.

things i ruled out by actually testing them:

not the model. tried 3.7 flash, 3 flash preview, and 3.1 flash lite. identical behaviour on all of them.

not the tools. grounding, code execution, url context, all switched off, still fails.

not the prompt. “hello” failed, then a minute later the same prompt worked, then failed again. no pattern i can find, and it’s not language related either, arabic and english both fail and both occasionally work.

not a stale conversation. brand new chats fail too.

not first vs follow up message. both fail, both sometimes succeed.

not browser stuff. clean profile, one account signed in, no vpn, no extensions.

so right now the project exists, the api is enabled, the key exists and is properly bound, and it still throws permission denied on most requests. retrying the exact same prompt eventually gets through, which makes it feel like something on the backend isn’t consistent rather than an account or config problem.

two questions. is anyone else seeing the intermittent version of this rather than a hard failure? and is there a supported way to use the playground on the free tier now, given the key slot wants a paid key?

happy to provide the project id by dm if a mod needs it.