The first error most teams hit when calling Claude on Google Vertex AI is a 403 PERMISSION_DENIED. It is frustrating precisely because it is generic: Google returns the same status code whether your identity lacks a role, the API was never switched on, you pointed at the wrong project, or your local credentials have gone stale. The good news is that these four causes are easy to separate once you know what each one needs.
Cause 1: The caller is missing an IAM role
Using Claude as a partner model on Vertex AI requires two distinct permissions, and teams routinely have one but not the other. To enable a Claude model in Model Garden, the enabling identity needs the Consumer Procurement Entitlement Manager role (roles/consumerprocurement.entitlementManager). To call the model at runtime, the calling identity needs the aiplatform.endpoints.predict permission, which is included in the Vertex AI User role (roles/aiplatform.user).
A common failure pattern: an admin enables the model with their own account, everything works in the console, and then the application's service account — which was never granted roles/aiplatform.user — gets a 403 in production. Grant the runtime role explicitly:
gcloud projects add-iam-policy-binding PROJECT_ID \
--member=serviceAccount:my-app@PROJECT_ID.iam.gserviceaccount.com \
--role=roles/aiplatform.user
The --member flag also accepts user:, group:, and domain: identifiers, so you can grant a whole team at once.
Cause 2: The API or the model was never enabled
Three enablement steps must all be complete in the project you are calling. First, the Vertex AI API itself (aiplatform.googleapis.com) must be enabled — doing that requires the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Second, each Claude model must be individually enabled from its Model Garden model card, which includes accepting the Terms of Service. Third, your organization policy must allow the Cloud Commerce Consumer Procurement API (cloudcommerceconsumerprocurement.googleapis.com); locked-down enterprises often block Marketplace-related services by default, and Assured Workloads boundaries may need explicit violation exceptions.
Note one edge case on the terms step: Anthropic prohibits certain resellers from reselling its products, and if your Google Cloud billing account is managed by a prohibited reseller you will be unable to accept the Terms of Service or enable Claude models at all.
Cause 3: You are calling the wrong project
Roles, API enablement, and model enablement are all per-project. If the project_id in your client doesn't match the project where all of that was done, you get a 403 that looks identical to a missing role. Print what your code is actually using:
from anthropic import AnthropicVertex
client = AnthropicVertex(project_id="my-prod-project", region="global")
# Confirm this is the project where the model was enabled,
# not your personal sandbox or a shared dev project.
Watch for environment variables or shared config that silently override the project — a client configured from GOOGLE_CLOUD_PROJECT on a developer laptop often points somewhere unexpected.
Cause 4: Stale Application Default Credentials
Locally, the SDK authenticates through Application Default Credentials (ADC) — the ambient Google credentials on the machine. If those were created weeks ago, against a different account, or before a role change, refresh them:
gcloud auth application-default login
Then verify the token works at the HTTP level, bypassing your application code entirely, with a curl call using Authorization: Bearer $(gcloud auth print-access-token). If curl succeeds and your app still fails, the app is using different credentials (often a service account) than your shell.
A five-minute triage order
| Check | What confirms it |
|---|---|
| 1. Right project? | The project_id in the client matches the project where the model was enabled |
| 2. API + model enabled? | aiplatform.googleapis.com enabled; Model Garden card shows the model as enabled |
| 3. Runtime role granted? | The calling identity has roles/aiplatform.user in that project |
| 4. Fresh credentials? | Re-run ADC login; a bearer-token curl against the endpoint succeeds |
Where to go next
For the full role catalogue see the Vertex IAM roles reference, and for how ADC actually resolves credentials read Application Default Credentials for Claude on Vertex AI. Rate-limit errors have their own playbook in Handling 429 RESOURCE_EXHAUSTED.