Skip to main content

Anthropic

Use this when your team already runs on Anthropic and you want that vendor family to stay explicit in Loong config instead of disappearing behind a generic compatibility route.

At A Glance

FieldValue
Built-in kindanthropic
Provider groupDirect Hosted Providers
Protocol familyanthropic_messages
Feature familyanthropic
Auth schemex_api_key
Credential envsANTHROPIC_API_KEY
Aliasesanthropic_compatible
Default base URLhttps://api.anthropic.com
Request endpointhttps://api.anthropic.com/v1/messages
Models endpointhttps://api.anthropic.com/v1/models

Minimal Config

active_provider = "anthropic"

[providers.anthropic]
kind = "anthropic"
api_key = { env = "ANTHROPIC_API_KEY" }
model = "auto"

Verify It

loong doctor
loong list-models
loong ask --message "Say hello and name the active provider."
If list-models is unreliable for this account or region, pin an explicit provider.model or add preferred_models instead of leaving recovery implicit.

Auth And Routing Contract

ContractValue
Auth optionalno
Model probe auth optionalno
Default API key envANTHROPIC_API_KEY
OAuth envnone
Primary request routehttps://api.anthropic.com/v1/messages
Primary model-catalog routehttps://api.anthropic.com/v1/models

Operator Notes

  • Default headers are injected automatically: anthropic-version: 2023-06-01.