---
title: "Claude on Google Vertex, billed to your own project · Selan"
description: "Run Claude on a Google Cloud project you own, billed to your own Google account. What to create, what to grant, and the two steps that catch people out."
url: https://selan.ai/docs/vertex
updated: 2026-12-03T10:06:56+02:00
---

Start here

Docs · Google Vertex

# Connect Claude on Google Vertex

Run Claude on a Google Cloud project you own, so the inference lands on your Google invoice. Six steps, three of them commands.

## What are you setting up?

Selan holds no key to your Google account. You grant your workspace's own Google service account one role on a project you own, and we mint a short-lived token for each request. You can revoke the grant in one command without involving us.

Selan makes that account when an owner first picks Google Vertex in the Add dialog, and the dialog names it in the grant command. It serves your workspace alone and has no privileges of its own: everything it can do on your project comes from you.

**Use a project of its own.** The role you grant then reaches nothing else you run, and the Claude spend stays attributable on your bill.

## How do I set up Vertex, step by step?

Replace `YOUR_PROJECT` throughout with your project id. Steps 1, 2 and 5 happen in the Google Cloud console; 3, 4 and 6 are commands. The Selan dialog shows 3 and 4 filled in.

**1\. Create a project and link billing.**

```bash
gcloud projects create YOUR_PROJECT --name="Selan Vertex"
```

Then link a billing account in [Billing](https://console.cloud.google.com/billing). Vertex refuses a project with no billing, and the error does not say so.

**2\. Enable Claude in Model Garden.**

Open [Model Garden](https://console.cloud.google.com/vertex-ai/model-garden), search for Claude, open the model you want and press **Enable**. This accepts Anthropic's terms, per project. A project that has not done this has no Claude quota, the most common reason a connection fails.

**3\. Switch the Vertex API on.**

```bash
gcloud services enable aiplatform.googleapis.com --project YOUR_PROJECT
```

**4\. Grant your workspace's account the one role it needs.**

Copy this one from the Selan dialog, where `YOUR_WORKSPACE_ACCOUNT` is already filled in.

```bash
gcloud projects add-iam-policy-binding YOUR_PROJECT --member=serviceAccount:YOUR_WORKSPACE_ACCOUNT --role=roles/aiplatform.user
```

**5\. Request Claude quota.**

A new project starts at zero quota, and no command grants it. Open [Quotas](https://console.cloud.google.com/iam-admin/quotas), filter on `anthropic`, and request an increase on `global_online_prediction_requests_per_base_model` for each Claude model you intend to use. Quota is per model, and Google reviews the request, so it is not instant.

**6\. Sync the enablement across Google's regions.**

**Global** is a router over about a dozen regional backends, and each keeps its own copy of which models your project may use. Until the copies agree, some requests land on a backend that has never heard of the model, and Google answers `404` or `403` for a model that worked a second earlier (14% of one project's traffic).

The fix is one `:enableModel` call per region, which makes each backend re-read your allowlist. It changes nothing except what you accepted in step 2, and is idempotent, so re-running it is safe and checks the current state. Selan does not run it for you: reconfiguring a project should be an act you perform and see in your own audit log, so here is the script.

```bash
curl -O https://selan.ai/vertex-sync.sh
less vertex-sync.sh          # it is short, and says what each call does
chmod +x vertex-sync.sh

./vertex-sync.sh --show YOUR_PROJECT   # print the calls, send none of them
./vertex-sync.sh YOUR_PROJECT          # send them
./vertex-sync.sh YOUR_PROJECT claude-fable-5-1   # only the models you name, here Fable 5.1
```

`--show` prints the exact requests and sends none. If you would rather not run a downloaded script, this loop does the same:

```bash
PROJECT=YOUR_PROJECT
TOKEN=$(gcloud auth print-access-token)

for LOC in global us eu us-east5 us-east1 us-central1 us-west4 us-south1 \
           europe-west1 europe-west4 europe-north1 asia-southeast1; do
  case $LOC in
    global) HOST=aiplatform.googleapis.com ;;
    us|eu)  HOST=aiplatform.$LOC.rep.googleapis.com ;;
    *)      HOST=$LOC-aiplatform.googleapis.com ;;
  esac
  for MODEL in claude-opus-5-5 claude-sonnet-5-5 claude-haiku-5-5 claude-haiku-4-5@20251001; do
    curl -s -o /dev/null -w "$LOC $MODEL %{http_code}\n" -X POST \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -H "x-goog-user-project: $PROJECT" \
      "https://$HOST/v1beta1/projects/$PROJECT/publishers/anthropic/models/$MODEL:enableModel" \
      -d '{}'
  done
done
```

Every line should read `200`. The list of hosts is the list of backends: leaving one out leaves that backend stale. Add any model you intend to use to the inner list, or name it after the project when you run the script. The script enables Opus 5.5, Sonnet 5.5, Haiku 5.5 and Haiku 4.5 by default; any other model, Fable 5.1 included, you name yourself.

`Publisher Model […] not found` means Google does not offer that model in that region: harmless. `No entitlements…` means this project never accepted the model in Model Garden (step 2); re-running does not fix it.

**This is a workaround, not a setting.** Google is fixing the routing fault, after which step 6 is not needed. Having run it does no harm.

## Why will some Claude 5 models not serve on Vertex?

Some Claude 5 models, Fable 5.1 among them, are refused in every region until you tell Google you accept data sharing with Anthropic, whatever steps 2 and 6 say:

```text
403  Access to this model requires data sharing to be enabled for publisher 'anthropic'.
```

This is your decision about your own prompts and outputs, and Selan does not do it or advise on it. Read [Google's description of what it covers](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude). Accepting takes the same per-region fanout as step 6; set on `global` alone it appears to succeed and changes nothing:

```bash
PROJECT=YOUR_PROJECT
MODEL=claude-fable-5-1
TOKEN=$(gcloud auth print-access-token)

for LOC in global us eu us-east5 us-east1 us-central1 us-west4 us-south1 \
           europe-west1 europe-west4 europe-north1 asia-southeast1; do
  case $LOC in
    global) HOST=aiplatform.googleapis.com ;;
    us|eu)  HOST=aiplatform.$LOC.rep.googleapis.com ;;
    *)      HOST=$LOC-aiplatform.googleapis.com ;;
  esac
  curl -s -o /dev/null -w "$LOC %{http_code}\n" -X POST \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -H "x-goog-user-project: $PROJECT" \
    "https://$HOST/v1beta1/projects/$PROJECT/locations/$LOC/publishers/anthropic/models/$MODEL:setPublisherModelConfig" \
    -d '{"publisherModelConfig":{"dataSharingEnabledProvider":"ANTHROPIC"},
         "updateMask":"dataSharingEnabledProvider"}'
done
```

`200` is done and `409` is already done. Keep `updateMask` in the body: without it Google replaces the model's whole configuration, which switches off any request logging you had set up.

Step 6 still applies: run `./vertex-sync.sh YOUR_PROJECT claude-fable-5-1`, or add the model to the loop's list. Data sharing is not quota: a model can clear this gate and still answer `429`, which is step 5.

## How do I connect it in Selan?

An owner opens **Tokens → Add token**, chooses **Google Vertex** as the provider, enters the project id and presses Add. Add first runs one real token of inference against your project as your workspace's account, and stores nothing unless that succeeds. A project connects to one Selan workspace at a time.

**Selan connects every project on Global.** It has the best availability and no price premium, and it is the only tier that carries every current Claude model; regions such as `europe-west1` serve only older ones.

Gemini through the connection is served from Google's EU tier, which answers in seconds where Global can queue for minutes. When Google answers a Global request with `429`, Selan resends it once on the EU tier of the same project. Add tries Gemini on the EU tier too, so a project that cannot use it is refused when you add it.

## Why does Vertex refuse?

Add answers one of the first two rows whatever is missing, so that it never says whose project an id is.

| What Selan says | What to do |
| --- | --- |
| This project hasn't given your workspace's Google account access yet | Run the dialog's two commands, steps 3 and 4, and check the project id matches the one you typed. Then check steps 2 and 5: a project with no Claude enabled or no Claude quota answers the same. Both commands are idempotent. |
| Too many tries to connect a Google project in the last hour | A workspace gets five failed tries an hour. Finish the steps above, then try again later. |
| Works, then fails, then works again | Step 6. An intermittent `404` or `403` on a model that exists is Google's routing, and does not settle on its own. |
| …requires data sharing to be enabled | A Claude 5 model with its own consent step. See [data sharing](#data-sharing). |

## How do I turn it off?

Remove the connection in Selan, or revoke the grant on your side, which is absolute and needs nothing from us. Name the account you granted in step 4:

```bash
gcloud projects remove-iam-policy-binding YOUR_PROJECT --member=serviceAccount:YOUR_WORKSPACE_ACCOUNT --role=roles/aiplatform.user
```

Selan stores no key, so nothing is left to rotate. The next request fails to authenticate.

## Related

-   [How to run Claude Code on Vertex AI for a team](https://selan.ai/guides/claude-code-vertex-ai): Claude Code's own Vertex settings, pinned models, and what it lacks there.
-   [Claude Code and Codex with EU data residency](https://selan.ai/guides/claude-code-eu-data-residency): which providers run the model in the EU, and what can still leave it.
-   [Claude apps gateway alternative](https://selan.ai/compare/claude-apps-gateway): Anthropic's self-hosted gateway, which can also forward to Google Cloud, against Selan.
-   [How Claude Code and Codex run without API keys on laptops](https://selan.ai/guides/claude-code-without-api-keys): provider access that never reaches a laptop.
-   [How to run Gemini in Claude Code](https://selan.ai/guides/gemini-in-claude-code): Gemini 3.8 Flash on this connection, beside Claude, and what running it by hand takes.
-   [Models and providers](https://selan.ai/docs/providers): every account Selan can serve a model from.
-   [What an owner sets](https://selan.ai/docs#admins): connecting providers beside the other company switches.
