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

# Google Vertex AI

> Integrate Google Vertex AI models through the Adaline Proxy for automatic telemetry and observability.

# Google Vertex AI

Integrate Google Vertex AI models through the Adaline Proxy to automatically capture telemetry — requests, responses, token usage, latency, and costs — with minimal code changes. Vertex AI provides enterprise-grade access to Gemini models through your Google Cloud project.

## Supported Models

**Chat Models**

| Model | Description |
| - | - |
| `gemini-3.1-pro-preview` | Latest Gemini 3.1 Pro preview |
| `gemini-3-pro-preview` | Gemini 3 Pro preview |
| `gemini-3-flash-preview` | Gemini 3 Flash preview |
| `gemini-2.5-pro` | Gemini 2.5 Pro |
| `gemini-2.5-pro-preview-03-25` | Gemini 2.5 Pro March 2025 preview |
| `gemini-2.5-flash` | Gemini 2.5 Flash |
| `gemini-2.5-flash-preview-04-17` | Gemini 2.5 Flash April 2025 preview |
| `gemini-2.5-flash-lite` | Lightweight Gemini 2.5 |
| `gemini-2.5-flash-lite-preview-09-2025` | Gemini 2.5 Flash Lite September 2025 preview |
| `gemini-2.0-flash` | Fast Gemini 2.0 model |
| `gemini-2.0-flash-exp` | Experimental Gemini 2.0 Flash |
| `gemini-2.0-flash-lite` | Lightweight Gemini 2.0 |
| `gemini-1.5-pro` | Gemini 1.5 Pro, 1M token context |
| `gemini-1.5-pro-latest` | Gemini 1.5 Pro latest |
| `gemini-1.5-pro-002` | Gemini 1.5 Pro version 002 |
| `gemini-1.5-pro-001` | Gemini 1.5 Pro version 001 |
| `gemini-1.5-flash` | Gemini 1.5 Flash |
| `gemini-1.5-flash-latest` | Gemini 1.5 Flash latest |
| `gemini-1.5-flash-002` | Gemini 1.5 Flash version 002 |
| `gemini-1.5-flash-001` | Gemini 1.5 Flash version 001 |

**Embedding Models**

| Model | Description |
| - | - |
| `text-embedding-004` | Latest text embedding model |
| `text-multilingual-embedding-002` | Multilingual embedding model |
| `textembedding-gecko@003` | Gecko embedding model |
| `textembedding-gecko-multilingual@001` | Multilingual Gecko |

## Proxy Base URL

```
https://gateway.adaline.ai/v1/vertex
```

## Prerequisites

1. A [Google Cloud project](https://console.cloud.google.com) with Vertex AI API enabled
2. GCP credentials configured (application default credentials or service account)
3. An [Adaline API key](https://www.adaline.ai/docs/admin/create-api-keys.md), project ID, and prompt ID

## Chat Completions

### Complete Chat

```python Python theme={null}
from google import genai
from google.genai import types

client = genai.Client(
    http_options={
        "base_url": "https://gateway.adaline.ai/v1/vertex",
        "headers": {
            "adaline-api-key": "your-adaline-api-key",
            "adaline-project-id": "your-project-id",
            "adaline-prompt-id": "your-prompt-id",
        },
    },
    vertexai=True,
    project="your-gcp-project-id",
    location="us-central1",
)

response = client.models.generate_content(
    model="gemini-1.5-pro",
    contents="What are the advantages of using Google Cloud for AI workloads?",
    config=types.GenerateContentConfig(
        http_options=types.HttpOptions(
            headers={
                "adaline-trace-name": "vertex-chat-completion"  # Optional
            }
        )
    )
)

print(response.text)
```

> [!NOTE]
>
> Vertex AI uses `vertexai=True` and requires a GCP `project` and `location`, unlike Google AI Studio which only needs an API key. Headers are passed via `http_options`.

### Stream Chat

```python Python theme={null}
from google import genai
from google.genai import types

client = genai.Client(
    http_options={
        "base_url": "https://gateway.adaline.ai/v1/vertex",
        "headers": {
            "adaline-api-key": "your-adaline-api-key",
            "adaline-project-id": "your-project-id",
            "adaline-prompt-id": "your-prompt-id",
        },
    },
    vertexai=True,
    project="your-gcp-project-id",
    location="us-central1",
)

stream = client.models.generate_content_stream(
    model="gemini-1.5-pro",
    contents="Explain the concept of serverless computing in detail.",
    config=types.GenerateContentConfig(
        http_options=types.HttpOptions(
            headers={
                "adaline-trace-name": "vertex-stream-chat"  # Optional
            }
        )
    )
)

for chunk in stream:
    if hasattr(chunk, 'text') and chunk.text:
        print(chunk.text, end="")
```

## Embeddings

```python Python theme={null}
from google import genai
from google.genai import types

client = genai.Client(
    http_options={
        "base_url": "https://gateway.adaline.ai/v1/vertex",
        "headers": {
            "adaline-api-key": "your-adaline-api-key",
            "adaline-project-id": "your-project-id",
            "adaline-prompt-id": "your-prompt-id",
        },
    },
    vertexai=True,
    project="your-gcp-project-id",
    location="us-central1",
)

response = client.models.embed_content(
    model="text-embedding-004",
    contents="The quick brown fox jumps over the lazy dog",
    config=types.EmbedContentConfig(
        http_options=types.HttpOptions(
            headers={
                "adaline-trace-name": "vertex-embedding"  # Optional
            }
        )
    )
)
```

## Google AI Studio vs Vertex AI

| Feature | Google AI Studio | Vertex AI |
| - | - | - |
| Authentication | API key | GCP credentials (IAM) |
| Proxy base URL | `gateway.adaline.ai/v1/google` | `gateway.adaline.ai/v1/vertex` |
| SDK parameter | `api_key="..."` | `vertexai=True, project="...", location="..."` |
| Best for | Prototyping, personal projects | Enterprise, production workloads |
| Data residency | No control | Region-specific |

## Next Steps

* [Multi-Step Workflows](https://www.adaline.ai/docs/integrations/examples/multi-step-workflows.md) — RAG pipelines, multi-step generation, and conversational agents
* [Headers Reference](https://www.adaline.ai/docs/reference/proxy/headers.md) — Complete header documentation

***

> [card] [Back to Integrations](https://www.adaline.ai/docs/integrations/introduction.md)
>
> Browse all integrations


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