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

# Vertex AI Gemini

> Connect Vertex AI Gemini to SentiVue Talk

Vertex AI Gemini provides the **language model**, running Gemini inside your own Google Cloud project.

## What you need

| Field                | Required |
| -------------------- | -------- |
| Service-account JSON | Yes      |

## Getting a service-account JSON

1. In the [Google Cloud Console](https://console.cloud.google.com/), select or create a project.
2. Enable the **Vertex AI API** (`aiplatform.googleapis.com`) on that project.
3. Go to **IAM & Admin → Service Accounts** and create one.
4. Grant it the **Vertex AI User** role (`roles/aiplatform.user`). This is the role that permits calling Gemini.
5. Open its **Keys** tab, choose **Add Key → Create new key**, and select **JSON**.
6. The file downloads once. Store it securely and treat it as a secret.

Upload the file as-is, including `private_key` and `client_email`. The project ID is read out of the JSON, so you do not type it — supplying a different one is the kind of mismatch that only shows up as a failure mid-call.

## Adding the connection

1. Go to **Connections** and choose **Vertex AI Gemini**.
2. Use **Upload JSON** to attach the service-account file.
3. Save.

SentiVue Talk checks the credential with Google as you save. That confirms the service account authenticates — it does not confirm the project has the API enabled or the right role, which surface on the first call.

## What you can select afterwards

Choose your models on [Model Configurations](/talk/configurations/inference-providers).

**Language model** — start on a Flash tier and move up only if the agent's reasoning falls short. Latency is heard as hesitation before the agent speaks. See Google's [Gemini model list](https://cloud.google.com/vertex-ai/generative-ai/docs/models).

## Completing the pipeline

This connection covers the language model only. A call also needs a voice and a transcriber, each from its own connection:

| Need          | Where to set it                                 | Providers                                                                                                                                                           |
| ------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Voice         | [Voice](/talk/configurations/voice)             | [Google Cloud](/talk/configurations/providers/google-cloud) Chirp 3 HD, [Gemini TTS](/talk/configurations/providers/google-gemini-tts), or any other TTS connection |
| Transcription | [Transcriber](/talk/configurations/transcriber) | [Google Cloud](/talk/configurations/providers/google-cloud) or any other STT connection                                                                             |

For a single connection that handles the whole conversation instead, see [Vertex AI Gemini Live](/talk/configurations/providers/vertex-ai-live).

## Vertex AI or AI Studio

Both run Gemini. They differ in how you are billed and how access is controlled.

|                | Vertex AI Gemini                     | [Gemini](/talk/configurations/providers/google-gemini) |
| -------------- | ------------------------------------ | ------------------------------------------------------ |
| Credential     | Service-account JSON                 | AI Studio API key                                      |
| Billing        | Your Google Cloud account            | Separate AI Studio billing                             |
| Access control | IAM roles on the service account     | Whoever holds the key                                  |
| Region         | You choose where requests are served | Not selectable                                         |

Choose Vertex when Gemini spend belongs on an existing Google Cloud bill, when access has to be revocable through IAM, or when requests need to stay in a particular region. Choose the AI Studio key when none of that applies and you want the shorter setup.

## Troubleshooting

<AccordionGroup>
  <Accordion title="I have an API key, not a service account">
    An AI Studio API key belongs on the [Gemini](/talk/configurations/providers/google-gemini) connection. Vertex and the Gemini Developer API are separate backends: Vertex authenticates through Google Cloud credentials against your project, and does not take an API key.
  </Accordion>

  <Accordion title="Calls fail after adding the JSON">
    Confirm the **Vertex AI API** is enabled on the project the service account belongs to. A valid service account on a project without that API enabled fails at call time, not when you save the connection.
  </Accordion>

  <Accordion title="A 403 during a call">
    Permission denied — the service account is reaching Vertex but is not allowed to call the model. Check that it still holds the **Vertex AI User** role on that project. IAM changes and role removals surface here rather than at save time.
  </Accordion>

  <Accordion title="The service-account key will not upload">
    Make sure it is the JSON file, not P12, and that you pasted the whole file contents rather than a single field from it.
  </Accordion>
</AccordionGroup>
