Hello Google Support Team,
I am facing a major issue with the newly generated API Key. Google AI Studio is only issuing keys starting with the AQ. prefix.
Every time I call the generativelanguage.googleapis.com endpoint (even via x-goog-api-key header), it fails with: 401 UNAUTHENTICATED — ACCESS_TOKEN_TYPE_UNSUPPORTED. The system is treating the new key format as an OAuth token instead of a standard API key.
Hello @Immad_Shahzad ,
This error isn’t related to the AQ. format per se. It usually happens if you are using an invalid key or a deprecated model, please try with a new key and make sure you are using a model that’s not deprecated, if you still get the error, please share a sample payload/ CURL request to help us reproduce the issue at our end?
Your curl request should look similar to the example provided in the documentation.