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.