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
- Enable the Vertex AI API for your GCP project.
- Request access to Claude on Vertex AI for your project and region. Model availability and naming follow Google's Vertex AI Anthropic documentation.
- Create a service account:
- In the Google Cloud console, go to IAM & Admin → Service 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_emailandprivate_keyfrom this file as separate Port secrets.
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 purpose | Example secret name | Value |
|---|---|---|
| Service account email | VERTEX_SA_CLIENT_EMAIL | client_email from the JSON key |
| Service account private key | VERTEX_SA_PRIVATE_KEY | private_key from the JSON key (PEM, including -----BEGIN PRIVATE KEY-----) |
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: trueto enable Anthropic prompt caching through Port. - Set
extendedThinking: truewhen the model supports extended thinking budgets. - Set
adaptiveThinking: truefor models that support adaptive thinking (instead of or in addition toextendedThinking). - Set
nativeStructuredOutput: truewhen the model accepts Anthropic's nativeoutput_formatfor structured output. Leave it unset to let Port infer support from the model identifier, or set it tofalsewhen the identifier resembles a Claude model but the endpoint does not supportoutput_format.
Optional fields on each model entry include displayName and contextWindow. See the API reference for the full schema.
After registration
- Set organization defaults in the Builder UI or with Change default LLM provider and model.
- Or pass
provider: "vertex-anthropic"and the registered modelnameon individual general-purpose AI interactions or invoke a specific agent calls.
For validation flow, default selection, and common failures, use Setup & configuration alongside your Vertex AI quotas and Cloud Logging.