Hello Google Gemini API team,
I am experiencing an authentication failure when calling the Gemini Developer API using an API key created through Google AI Studio.
Environment
-
Project name: Digilight Gemini Free AI
-
Project ID:
gen-lang-client-04168110.. -
Model:
gemini-3.1-flash-lite -
Key type: AI Studio authorization key (
AQ.format), bound to a service account -
Billing status: Billing disabled for this project in Google Cloud
-
AI Studio tier: Free tier
Error details
I ran one diagnostic request to the documented generateContent endpoint using the x-goog-api-key header and fictional test data.
The request returned:
-
HTTP status:
401 -
Error:
ACCESS_TOKEN_TYPE_UNSUPPORTED
The diagnostic’s local preflight passed. The API hostname resolves successfully, but Google rejects the key when the request is sent.
The diagnostic made no retries and did not switch providers or models.
Questions
-
Is this authorization-key type currently supported for
generateContentwithgemini-3.1-flash-lite? -
Does the associated service account require a specific IAM role or permission to call the Gemini Developer API?
-
Is there a documented resolution for
ACCESS_TOKEN_TYPE_UNSUPPORTEDwhen using an AI Studio authorization key? -
Can this issue be resolved while keeping the project on the Free tier with Cloud Billing disabled?
I have not enabled billing or changed the project’s configuration.
I have deliberately omitted the API key and all service-account credentials.
Thank you for your assistance.