> For the complete documentation index, see [llms.txt](https://docs.decisionrules.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decisionrules.io/doc/ai-assistant/assistant-setup/google-vertex-credentials-json.md).

# Google Vertex Credentials JSON

## Google Vertex Setup Guide

### How to Generate Your Gemini Configuration

#### 1. Open Google Cloud Console

Go to **Google Cloud Console** and open **Service Accounts**.

#### 2. Select or Create a Project

Choose an existing Google Cloud project or create a new one where you want to manage AI access.

#### 3. Create a Service Account

If you do not already have one:

* Click **Create Service Account**
* Enter a name, for example `Gemini AI Access`
* Click **Create and Continue**

#### 4. Assign Roles

Grant the service account the **Vertex AI User** role, or another role with sufficient access to Vertex AI.

Then click **Done**.

#### 5. Generate a JSON Key

* Open the created service account
* Go to the **Keys** tab
* Click **Add Key** → **Create New Key**
* Select **JSON**
* Click **Create**

Download the JSON file and store it securely.

### Example Credentials JSON

When configuring **Google Vertex**, the credentials JSON should look similar to this:

```json
{
  "type": "service_account",
  "project_id": "your-gcp-project-id",
  "private_key_id": "your-private-key-id",
  "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
  "client_email": "your-service-account@your-gcp-project-id.iam.gserviceaccount.com",
  "client_id": "123456789012345678901",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-service-account%40your-gcp-project-id.iam.gserviceaccount.com",
  "universe_domain": "googleapis.com"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.decisionrules.io/doc/ai-assistant/assistant-setup/google-vertex-credentials-json.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
