# Gemini Enterprise Express Mode API Key

**URL:** <https://discuss.ai.google.dev/t/gemini-enterprise-express-mode-api-key/143876>\
**Category:** Gemini API\
**Tags:** api\
**Created:** [May 7, 2026, 9:09am UTC](https://discuss.ai.google.dev/t/gemini-enterprise-express-mode-api-key/143876 "2026-05-07T09:09:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pablo\_Rodriguez\_Pina](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/pablo_rodriguez_pina/32/65180_2.png) [@Pablo\_Rodriguez\_Pina](https://discuss.ai.google.dev/u/Pablo_Rodriguez_Pina)\
**Post date:** [May 7, 2026, 9:09am UTC](https://discuss.ai.google.dev/t/gemini-enterprise-express-mode-api-key/143876/1 "2026-05-07T09:09:10Z")

</div>

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 &nbsp;|&nbsp; Google Cloud Documentation](https://cloud.google.com/docs/authentication)

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 &nbsp;|&nbsp; Generative AI on Vertex AI &nbsp;|&nbsp; Google Cloud Documentation](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview)

But when i try (i am using the genai java sdk) it returns a 401

client = Client.builder()  
.vertexAI(enterprise)  
.apiKey(“AQ.Ab8…”)  
.build();

---

<div class="post-metadata">

**Author:** ![Rebbanpalli\_Naveen](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/rebbanpalli_naveen/32/120945_2.png) [@Rebbanpalli\_Naveen](https://discuss.ai.google.dev/u/Rebbanpalli_Naveen)\
**Post date:** [June 25, 2026, 3:10pm UTC](https://discuss.ai.google.dev/t/gemini-enterprise-express-mode-api-key/143876/2 "2026-06-25T15:10:07Z")

</div>

Hello @Pablo_Rodriguez_Pina,

For issues related to the Vertex AI API, please contact your sales representative if you have one. Otherwise, you can find more relevant assistance on the [Google Cloud Forum](https://discuss.google.dev/c/google-cloud/14).
