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

Check out Port for yourself ➜ 

Anthropic setup

Connect Port to Anthropic's API to use Claude models like claude-sonnet-4-20250514, claude-haiku-4-5-20251001, and claude-opus-4-6. This guide walks you through storing your API key and registering Anthropic as an LLM provider in Port.

Prerequisites

  • An active Anthropic account with API access.
  • An Anthropic API key. You can generate one in your Anthropic Console.

Step 1: Store your API key in Port secrets

Before configuring the provider, store your Anthropic API key in Port's secrets system.

  1. In your Port application, click on your profile picture .
  2. Click on Credentials.
  3. Click on the Secrets tab.
  4. Click on + Secret and add your secret(s).

For provider-specific secret requirements and examples, see Step 2: Store API Keys in Secrets.

Secret naming flexibility

You can choose any names for your secrets. The examples are suggestions. Use names that make sense for your organization, and reference the exact names in your provider configuration.

For more details on managing secrets, see the Port Secrets documentation.

Step 2: Register Anthropic with the Port API

Call the Create or connect an LLM provider API with validate_connection=true to test your configuration. Set provider to "anthropic" and reference the secret name you created in Step 1.

{
"provider": "anthropic",
"enabled": true,
"config": {
"apiKeySecretName": "anthropic-api-key"
}
}
Supported models

When you register Anthropic without specifying model overrides, Port validates all supported Claude models by default. If you only have access to specific models or want to limit which models are enabled, use the overrides field. See Model overrides for details.

Step 3: Validate the configuration

The validate_connection=true parameter tests your configuration by making a request to your provider. If validation succeeds, your provider configuration is saved. If it fails, check the error message for details.

For more troubleshooting steps, see the Setup & Configuration guide.

Common validation failures:

  • Invalid API key: Verify your API key is correct and active in your Anthropic Console.
  • Insufficient quota: Ensure your Anthropic account has sufficient usage quota or credits.
  • Rate limit exceeded: Wait and retry if you've exceeded Anthropic's rate limits.

After registration

Once your provider is configured:

For more information on provider selection and validation flow, see Setup & Configuration.