> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

Vertex Anthropic setup

Port's vertex-anthropic provider connects to Claude models hosted on Google Vertex AI through the Vertex Anthropic partner integration. You register the model IDs your project exposes and authenticate with a GCP service account. Complete the steps below before Step 2: store API keys in secrets in the main setup guide.

Step 1: Prepare your GCP project

  1. Enable the Vertex AI API for your GCP project.
  2. Request access to Claude on Vertex AI for your project and region. Model availability and naming follow Google's Vertex AI Anthropic documentation.
  3. Create a service account:
    • In the Google Cloud console, go to IAM & AdminService accounts and create a service account for Port.
    • Grant the service account the Vertex AI User role (roles/aiplatform.user), or a custom role that includes permission to invoke the Claude models you configured.
    • Create a JSON key for the service account. You will store client_email and private_key from this file as separate Port secrets.
Region matters

Claude on Vertex AI is available only in specific regions (for example us-east5 or europe-west1). Set location in your Port provider config to the region where your models are enabled.

Step 2: Store credentials in Port secrets

Follow store API keys in secrets in the main guide.

Secret purposeExample secret nameValue
Service account emailVERTEX_SA_CLIENT_EMAILclient_email from the JSON key
Service account private keyVERTEX_SA_PRIVATE_KEYprivate_key from the JSON key (PEM, including -----BEGIN PRIVATE KEY-----)
Private key formatting

If you paste the private key with literal \n characters instead of real line breaks, Port normalizes them when calling Vertex AI.

Step 3: Register with the Port API

Call Create or connect an LLM provider with validate_connection=true while testing. Set provider to "vertex-anthropic" and list at least one model in config.models. Each name must match the model ID Vertex AI expects (for example claude-sonnet-4@20250514).

{
"provider": "vertex-anthropic",
"enabled": true,
"config": {
"clientEmailSecretName": "VERTEX_SA_CLIENT_EMAIL",
"privateKeySecretName": "VERTEX_SA_PRIVATE_KEY",
"project": "my-gcp-project",
"location": "us-east5",
"models": [
{
"name": "claude-sonnet-4@20250514",
"displayName": "Claude Sonnet 4",
"contextWindow": 200000,
"supportedFeatures": {
"temperature": true,
"caching": true,
"extendedThinking": true
}
}
]
}
}

Use supportedFeatures to reflect what your model supports in Vertex AI:

  • Set caching: true to enable Anthropic prompt caching through Port.
  • Set extendedThinking: true when the model supports extended thinking budgets.
  • Set adaptiveThinking: true for models that support adaptive thinking (instead of or in addition to extendedThinking).

Optional fields on each model entry include displayName and contextWindow. See the API reference for the full schema.

After registration

For validation flow, default selection, and common failures, use Setup & configuration alongside your Vertex AI quotas and Cloud Logging.