AQ authorization key returns 401 ACCESS_TOKEN_TYPE_UNSUPPORTED with Gemini API

I’m building a local Python application using the Gemini API.

New API keys generated in Google AI Studio are AQ authorization keys. My project is currently on the Free tier.

The key consistently returns:

401 UNAUTHENTICATED — ACCESS_TOKEN_TYPE_UNSUPPORTED

when used with:

  • google-genai Python SDK 2.18.1
  • GEMINI_API_KEY
  • Direct REST request using the x-goog-api-key header

I have independently reproduced the error outside my application, so this does not appear to be an application-code issue.

Project ID: gen-lang-client-02378057..

The API key itself is not being shared here for security reasons.

Is there a supported configuration for using this AQ authorization key with the Gemini Developer API, or is this currently a known AQ-key compatibility issue?

Hello @DJbronco15 ,
Please submit any compatibility issues with services/SDKs via our form so our engineering team can review this form.

Hello.

The issue is that when I click on the link to the form, it tells me that Google is no longer accepting said form, and to instead make a new post. Since that evidently wasn’t what I was supposed to do, perhaps you can help me with this?

Thanks!

Hello @DJbronco15 ,
This error usually occurs when the provided API key is invalid, truncated, or unlinked and has nothing to do with AQ type keys. The AQ key format is fully supported by the Gemini API, official SDKs, and REST endpoints.

  • Try generating a new API key for your project in Google AI Studio. Pass the key using the GEMINI_API_KEY environment variable or the x-goog-api-key header.
  • If you still face issues, please share a CURL request with us.