Cannot Generate API Key in Google AI Studio: Project Selection Unavailable and 403 Error

I am unable to obtain an API key in Google AI Studio.
Previously, a project selection dialog would appear, and I was able to obtain the API key afterward. However, now I can’t even select a project.

Error message displayed on screen:
Failed to generate API key: permission denied. Please try again.

The network shows an error, and the API key request returns a 403:

  • https://alkalimakersuite-pa.clients6.google.com/$rpc/google.internal.alkali.applications.makersuite.v1.MakerSuiteService/ListCloudProjects
    Status: 200 OK
    Response: []. This is strange—I have multiple projects. I’m logged into GCP and I am the owner.
  • https://alkalimakersuite-pa.clients6.google.com/$rpc/google.internal.alkali.applications.makersuite.v1.MakerSuiteService/GenerateCloudApiKey
    Status: 403 Forbidden

Hey @t-motoshima — thanks for the detailed breakdown, and yeah, this definitely looks like a frustrating issue.

A few things to try or check:

  1. Project Permissions: Even if you’re listed as the owner in GCP, double-check that the project has AI Studio and Gemini API enabled, and that your account has the necessary IAM roles (like Editor or Service Account Token Creator).
  2. Billing Setup: Make sure billing is enabled for the project. Sometimes API key generation fails silently if billing isn’t active or linked properly.
  3. Quota or Policy Restrictions: If your organization has policies or VPC Service Controls in place, they might be blocking access to certain APIs or services.
  4. Try Incognito or Another Browser: Occasionally, session or cookie issues can interfere with project selection in the UI.
  5. Console Logs: The 403 on GenerateCloudApiKey is key — it suggests a permission or policy block. You might want to check the Cloud Audit Logs for more context.

If none of that works, I’d recommend opening a support ticket through the Google Cloud Console — include the exact request/response logs you shared here. That should help them trace the issue faster.

Hope this gets resolved soon — let us know how it goes!

Thanks for reaching us!

1 Like

Thank you very much. There were no issues with the items you pointed out.

Until around the beginning of last week (probably around June 9, 2025), I was able to obtain a Gemini API key.

I haven’t changed any settings in GCP, but suddenly I started getting the following error and can no longer obtain a key:

“Failed to generate API key: permission denied. Please try again.”

According to the following status page, it seems that there was an issue on June 13, 2025, and it is marked as resolved. However, I believe that for some users like myself, the issue still persists:

https://aistudio.google.com/status

As a temporary workaround, although it’s unfortunate, I’ve given up on generating the key through Google AI Studio. Instead, I’m issuing the key from GCP’s “APIs & Services > Credentials” section (https://console.cloud.google.com/apis/credentials) and using that.

Thank you for your assistance in investigating the issue.

1 Like