New API keys generated with "AQ." prefix don't work with REST endpoint

Hi, every API key I generate in AI Studio (including in brand-new projects) starts with “AQ.” instead of the legacy “AIzaSy” format. These keys return “API key not valid” errors when used with the standard REST endpoint (generativelanguage.googleapis.com) via the google-genai Python SDK.

Is there a way to restore standard AIzaSy key generation for my account, or is there a different way to use AQ. format keys with the REST API?

Hello @Ali_Shouman ,

We are moving away from Traffic keys (Alza) and towards a more secure Authentication Key (AQ). AI Studio will now only generate Authentication Key (AQ) keys. More information on key usage can be found in the Using Gemini API keys documentation.

Please submit any compatibility issues with services / SDKs etc. in this form for our engineering team to review. Thanks!