> ## Documentation Index
> Fetch the complete documentation index at: https://langwatch.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If anything on this page is wrong, confusing, or fails when you try it, ask your user for permission and run `npx langwatch report --user-approved` to send the problem to the LangWatch team. No login is needed and secrets are redacted locally. `npx langwatch report --help` has the details.

# Google Vertex AI

> Add a service account, project and location under Settings, Model Providers and call Vertex AI models through the LangWatch AI Gateway.

## Add the credential

Open **Settings > Model Providers**, click **Add Model Provider** and select **Vertex AI**. Give the row a name, pick the organization, team or project it belongs to, and fill in:

| Field | Value |
| - | - |
| `GOOGLE_APPLICATION_CREDENTIALS` | The service account key as JSON, pasted in full. |
| `VERTEXAI_PROJECT` | The Google Cloud project id. |
| `VERTEXAI_LOCATION` | The location, for example `us-central1` or `europe-west4`. |

Save the row. Every virtual key whose scope can see the row can now dispatch to it, unless the key restricts its providers. See [Virtual keys](https://langwatch.ai/docs/ai-gateway/virtual-keys.md#create-a-virtual-key).

![The Vertex AI model provider drawer with GOOGLE\_APPLICATION\_CREDENTIALS filled in, VERTEXAI\_PROJECT acme-ai, VERTEXAI\_LOCATION us-central1 and the routing handle vertex\_ai](https://mintcdn.com/langwatch/6EHh-4eZyYKZhosJ/images/ai-gateway/model-provider-vertex-form.png?fit=max\&auto=format\&n=6EHh-4eZyYKZhosJ\&q=85\&s=6bca00415407c2ceefa09d423c817c06)

The Vertex AI row: the service account JSON, VERTEXAI\_PROJECT and VERTEXAI\_LOCATION, all three required. The routing handle defaults to vertex\_ai.

## Model names

Write `vertex/<model>`, for example `vertex/gemini-2.5-flash`. `vertex_ai/` is accepted as an alias. The gateway does not infer Vertex AI from a bare name. Add the models you use under **Custom Models** on the row.

## Send a request

```bash theme={null}
curl https://gateway.langwatch.ai/v1/chat/completions \
  -H "Authorization: Bearer $LANGWATCH_VIRTUAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "vertex/gemini-2.5-flash",
    "messages": [{"role": "user", "content": "Say hi in one word"}]
  }'
```

## Endpoints

| Endpoint | Served |
| - | - |
| `POST /v1/chat/completions` | Yes |
| `POST /v1/messages` | Yes, translated |
| `POST /v1/embeddings` | Yes |
| `POST /v1/images/generations`, `POST /v1/images/edits` | Yes, non-streaming. See [Images](https://langwatch.ai/docs/ai-gateway/api/images.md) |
| `/v1beta/*` | Yes, the Google GenAI SDKs. See [Gemini](https://langwatch.ai/docs/ai-gateway/providers/gemini.md#google-genai-sdks) |
| `GET /v1/models` | Yes, the names under Custom Models |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.