From 7cc84cd6af66dcf889f6354c2d074c0f51779eb8 Mon Sep 17 00:00:00 2001 From: chrisheecho <10987336+chrisheecho@users.noreply.github.com> Date: Mon, 7 Jul 2025 11:43:27 -0700 Subject: [PATCH] Update README.md to show API key usage for Vertex (#3060) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 53ef16d6..4f2d648e 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,20 @@ The Gemini API provides a free tier with [100 requests per day](https://ai.googl 3. (Optionally) Upgrade your Gemini API project to a paid plan on the API key page (will automatically unlock [Tier 1 rate limits](https://ai.google.dev/gemini-api/docs/rate-limits#tier-1)) +### Use a Vertex AI API key: + +The Vertex AI provides [free tier](https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview) using express mode for Gemini 2.5 Pro, control over which model you use, and access to higher rate limits with a billing account: + +1. Generate a key from [Google Cloud](https://cloud.google.com/vertex-ai/generative-ai/docs/start/api-keys). +2. Set it as an environment variable in your terminal. Replace `YOUR_API_KEY` with your generated key and set GOOGLE_GENAI_USE_VERTEXAI to true + + ```bash + export GOOGLE_API_KEY="YOUR_API_KEY" + export GOOGLE_GENAI_USE_VERTEXAI=true + ``` + +3. (Optionally) Add a billing account on your project to get access to [higher usage limits](https://cloud.google.com/vertex-ai/generative-ai/docs/quotas) + For other authentication methods, including Google Workspace accounts, see the [authentication](./docs/cli/authentication.md) guide. ## Examples