Hello Google AI Developers team,
I am reporting a reproducible Gemini API request failure involving a newly created AQ-prefixed authorization API key.
Environment
-
Operating system: Windows 11
-
Key type: AQ-prefixed authorization key created through Google AI Studio
-
Key status: The console shows that the key is bound to a service account
-
Project: Default Gemini Project
-
Python HTTP client:
requests
Tests performed
-
GET request to
https://generativelanguage.googleapis.com/v1beta/models, using thex-goog-api-keyheader. -
POST request to
https://generativelanguage.googleapis.com/v1beta/models/gemini-3.8-flash:generateContent, using the same authentication header and a minimal text-generation request.
Observed result
Both tests returned:
-
HTTP status:
400 Bad Request -
Content-Type:
text/html; charset=UTF-8 -
Response body:
<html><title>Error 400 (Bad Request)!!1</title></html>
The response does not contain the usual structured JSON error message, so I cannot identify the cause from the returned response.
A separate PowerShell request also failed with a connection-closed error.
I have checked the project selection in Google Cloud Console and tested the requests using Python. I have not established the underlying cause.
Could you please advise on the following?
-
How can I verify that this authorization key is correctly associated with the Gemini API rather than another Google API?
-
What could cause a generic HTML 400 response on the model-list endpoint?
-
Is there a recommended diagnostic procedure for this failure, or an account/project restriction that I should check?
I can provide further sanitized diagnostic output if required.
Thank you.