Hello Google AI team,
I am requesting help diagnosing a Gemini API location rejection from an Azure-hosted application.
The same Gemini API key and the same endpoint produce different results depending on where the request originates:
- From my Windows computer, GET https://generativelanguage.googleapis.com/v1beta/models returns HTTP 200 and a model list (including models/gemini-2.5-flash).
- From my Kodus API Docker container on an Azure VM, a direct GET to the same endpoint with the same key returns HTTP 400 FAILED_PRECONDITION: “User location is not supported for the API use.”
The VM’s outbound public IPv4 is 85.211.199.131. IPinfo identifies it as Kuala Lumpur, Malaysia (Microsoft, AS8075). Malaysia is listed as a supported Gemini API region: https://ai.google.dev/gemini-api/docs/available-regions
The error is returned by Google directly; the VM can reach generativelanguage.googleapis.com over HTTPS. The request used the standard v1beta model-list endpoint. I have not included the API key or Google Cloud project identifier.
Could you please clarify whether this is an egress-IP/location classification issue for this Microsoft-hosted address, or whether another account, project, key restriction, or API eligibility condition could produce this exact error? Please advise how to make requests from this Azure VM work while complying with the Gemini API region and key restrictions.
Thank you.