Gemini API – HTTP 401 ACCESS_TOKEN_TYPE_UNSUPPORTED with AQ. key

Subject: Gemini API returns 401 with an AQ. key from Google AI Studio

Hello Google AI team,

I am testing a Gemini API connection for a small personal AI communication project.

My API key was created in Google AI Studio on October 11, 2026, under the Free Tier. It uses the AQ. prefix.

Environment: Windows 11, Python 3.14, direct REST request using the x-goog-api-key header.

A read-only request for model gemini-2.5-flash-lite returns:

  • HTTP 401 Unauthorized

  • Status: UNAUTHENTICATED

  • Reason: ACCESS_TOKEN_TYPE_UNSUPPORTED

The locally loaded key has 106 characters and contains no whitespace. The project and key are visible in Google AI Studio.

Could you confirm whether additional configuration is required for AQ-format keys, or whether this is a known authentication issue?

Thank you.

Hello @Miroslav_Weiss ,

  1. Could you please try creating an API key in a new project within the Google AI Studio UI to check whether the issue is specific to your current project.

  2. If the error persists, please share the full JSON error response (including all details and metadata fields) along with your Google Cloud Project ID or Project Number so we can investigate further.