Account restricted to AQ. keys — all return 401 ACCESS_TOKEN_TYPE_UNSUPPORTED on generativelanguage.googleapis.com (requesting fix / AIza restoration)

Hi Gemini API team,

Every API key generated on my account is issued with the new “AQ.” (auth key) prefix. AI Studio no longer offers the standard “AIza” format, even when I create a key in a brand-new project. All of these AQ. keys are rejected by the Generative Language REST API.

Error
Calling:
POST https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent

Returns:
401 UNAUTHENTICATED
“Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential.”
reason: ACCESS_TOKEN_TYPE_UNSUPPORTED

This happens regardless of how the key is sent — I have tested both:

  • x-goog-api-key: header
  • ?key= query parameter

Both return the exact same ACCESS_TOKEN_TYPE_UNSUPPORTED error. This is a plain REST call (PHP + cURL, no SDK involved), so it is not an SDK or OpenAI-compatibility issue.

What I have already tried (all failing identically):

  • Regenerating the key multiple times
  • Creating a key in a brand-new Google Cloud project
  • Sending the credential via header and via query param

In every case the key comes out as AQ. and is rejected with ACCESS_TOKEN_TYPE_UNSUPPORTED.

Affected project:
Project ID: [9463996790..]
Project number: [projects/9463996790..]
Account created: [07/2026]

Could you please look into the AQ-only restriction on my account/project and either restore the ability to generate working keys, or advise what configuration is needed so the AQ. keys authenticate correctly against the native Generative Language API?

Thank you.

Hello @Jorge_Barros ,

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!