Set up Anthropic

Last validated:

Configure an Anthropic provider in Aperture so your team can access Claude models through your tailnet. Anthropic uses the x-api-key authorization type and the anthropic_messages compatibility flag, which differ from the defaults.

Your client and selected provider must support the same API format. Refer to Supported providers and clients for available setup options and requirements.

Prerequisites

Before you begin, you need:

Configure the provider

Add Anthropic as a provider in your Aperture configuration:

{
  "providers": {
    "anthropic": {
      "baseurl": "https://api.anthropic.com",
      "apikey": "<your-anthropic-key>",
      "authorization": "x-api-key",
      "models": ["claude-sonnet-4-6", "claude-opus-4-8", "claude-haiku-4-5"],
      "compatibility": {
        "anthropic_messages": true
      }
    }
  }
}

The authorization field is set to x-api-key because Anthropic uses the x-api-key header instead of a bearer token. The anthropic_messages flag tells Aperture to use the Anthropic message format instead of the default OpenAI chat completions format. Refer to the compatibility flags reference for the full list of flags.

By default, Aperture injects the configured apikey on every request to Anthropic. To forward each client's own credential to Anthropic instead, set auth_mode: "passthrough" on the provider. The client then supplies its own credential, which can be a personal API key or a subscription OAuth token, such as a Claude Pro or Max account. Refer to Set up passthrough mode for the full configuration.

Verify the provider

The best way to verify a connection to a specific model is to send a test request through the Models tab of the Aperture dashboard.

  1. Open the Aperture dashboard and select the Models tab.
  2. Find the model you want to test in the list of configured models. If the model is not listed, check your provider configuration and ensure the model name is correct.
  3. Select the Play icon to the left of the model name to send a test request. If the request succeeds, the icon changes to a green check mark. If it fails, the icon changes to a red "X".

This sends a request from your web browser to the tailnet to verify that Aperture can successfully route requests to the model through the configured provider and that your user account has the necessary permissions to access the model.

Next steps