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.
Aperture routes requests based on the model name, not the LLM client. Any LLM client configured to use Aperture can access any provider your admin has set up. Refer to the provider compatibility reference for the full list of supported providers and API formats.
Prerequisites
Before you begin, you need:
- An Aperture instance accessible from your device. Refer to get started with Aperture if you have not set this up.
- An Anthropic API key.
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-5", "claude-opus-4-5", "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 provider compatibility reference for the full list of flags.
After configuring the provider:
- Grant model access to the users or groups that need these models.
- Set up LLM clients to connect coding tools through Aperture.
Verify the provider
-
Open the Aperture dashboard and confirm the provider appears with the expected models.
-
Send a test request through a connected coding tool (such as Claude Code or Cursor), or use
curl:curl http://<aperture-address>/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model": "<model-name>", "messages": [{"role": "user", "content": "hello"}]}'Replace
<aperture-address>with your Aperture instance address and<model-name>with one of the models you configured for this provider. -
Check the Aperture dashboard session list for a new entry. The session shows the model name, token counts, and timestamp.
If the request fails, refer to the Aperture troubleshooting guide.