New Gemini AQ. API key returns 401 despite enabled API and bound service account

As of October 8, 2026, my Gemini Developer API requests fail with:

  • HTTP 401 UNAUTHENTICATED

  • Reason: ACCESS_TOKEN_TYPE_UNSUPPORTED

  • Service: generativelanguage.googleapis.com

  • Method: google.ai.generativelanguage.v1beta.ModelService.ListModels

Verified in Google Cloud Console:

  • Gemini API is enabled.

  • The key is restricted to Gemini API.

  • Application restrictions are set to None.

  • The key is bound to an automatically created AI Studio service account.

  • That service account is enabled.

  • AI Studio shows Tier 1 / prepaid billing.

The failure occurs with both an existing key and a new AQ. key created directly in Google AI Studio on October 8.

It reproduces using both the official Python SDK and a direct HTTP request:

GET https://generativelanguage.googleapis.com/v1beta/models?pageSize=1
Header: x-goog-api-key: [REDACTED]

The request does not select a model or upload media. The locally saved new key has no whitespace, quotation marks, or control characters, and its last four characters match the masked key shown in AI Studio.

Could you investigate the authentication failure and advise how to verify whether the key’s service-account binding is functioning correctly?

I can provide sanitized responses and configuration screenshots. I will not post the API key itself.

The project is linked to a Tier 1 prepaid billing account with a positive balance of JPY 1,000.

Hello @Game_Authority ,

Could you please try a couple of quick steps?

  • Try creating a new API key using a different project in Google AI Studio, and then make a CURL request.

If you continue to experience the same error, please provide via Direct Message:

  • The complete request and response JSON
  • Your project ID.