> ## Documentation Index
> Fetch the complete documentation index at: https://gomodel-docs-benchmark-writeup-and-tooling.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Vertex AI

> Configure Gemini on Google Vertex AI in GoModel, including ADC and service-account authentication, regions, and native vs OpenAI-compatible routing.

This page covers Gemini hosted on **Google Vertex AI**. For Gemini through
Google AI Studio API keys, see the [Google Gemini guide](/providers/gemini).

Vertex needs a GCP project, a region where the model is available, and either
Application Default Credentials or a service-account JSON key. GoModel routes
to Vertex's native Gemini publisher endpoint by default; switch to the
OpenAI-compatible endpoint when you need its compatibility behavior.

<Note>
  Vertex authentication is enterprise-oriented and may become paid or
  licensed in a future release.
</Note>

## Configure

```bash theme={null}
VERTEX_PROJECT=my-gcp-project
VERTEX_LOCATION=us-central1
VERTEX_AUTH_TYPE=gcp_adc       # default; ADC via gcloud, GKE Workload Identity, or metadata server
VERTEX_API_MODE=native         # or openai_compatible
```

Or in `config.yaml`:

```yaml theme={null}
providers:
  vertex:
    type: vertex
    auth_type: gcp_adc
    vertex_project: my-gcp-project
    vertex_location: us-central1
    api_mode: native
```

### Service-account authentication

```bash theme={null}
VERTEX_AUTH_TYPE=gcp_service_account
VERTEX_SERVICE_ACCOUNT_FILE=/secrets/service-account.json
# or VERTEX_SERVICE_ACCOUNT_JSON / VERTEX_SERVICE_ACCOUNT_JSON_BASE64
```

### Multiple regions or accounts

Use suffixed env vars to register additional Vertex providers:

```bash theme={null}
VERTEX_US_PROJECT=prod-ai
VERTEX_US_LOCATION=us-central1
VERTEX_US_AUTH_TYPE=gcp_adc

VERTEX_EU_PROJECT=prod-ai
VERTEX_EU_LOCATION=europe-west4
VERTEX_EU_AUTH_TYPE=gcp_service_account
VERTEX_EU_SERVICE_ACCOUNT_FILE=/secrets/vertex-eu.json
```

This registers `vertex-us` and `vertex-eu`.

## Base URLs and modes

Default bases are derived from project and location:

* OpenAI-compatible: `.../projects/{project}/locations/{location}/endpoints/openapi`
* native Gemini: `.../projects/{project}/locations/{location}/publishers/google`

Vertex embeddings use Vertex AI native prediction regardless of
`VERTEX_API_MODE`. Vertex does not expose Gemini Files or OpenAI-compatible
batch operations.

## Image input

| Mode                | OpenAI-style `image_url`                                                     |
| ------------------- | ---------------------------------------------------------------------------- |
| `native` (default)  | inline `data:` URLs only — remote `https://...` URLs are rejected            |
| `openai_compatible` | OpenAI-style remote URLs pass through to Vertex's OpenAI-compatible endpoint |

## Not yet integrated

* Automatic fetching of remote `image_url` values in native mode.
* Vertex Files and batch prediction APIs.

## References

* [Vertex AI OpenAI compatibility](https://cloud.google.com/vertex-ai/generative-ai/docs/start/openai)
* [Gemini API in Vertex AI](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference)
* [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials)
