I signed up, created the Express Mode Api Key,
but when i try to log in with just the key i get:
Exception in thread “main” com.google.genai.errors.ClientException: 401 . API keys are not supported by this API. Expected OAuth2 access token or other authentication credentials that assert a principal. See Authentication for Google Cloud APIs and services | Google Cloud Documentation
The docs claim it is perfectly possible and that the purpose of “express mode” is precisely to have a simple way to access the enterprise gemini api Vertex AI in express mode overview | Generative AI on Vertex AI | Google Cloud Documentation
But when i try (i am using the genai java sdk) it returns a 401
client = Client.builder()
.vertexAI(enterprise)
.apiKey(“AQ.Ab8…”)
.build();