Anthropic
- Create an account at https://platform.claude.com/
- Go to https://platform.claude.com/settings/keys and get your api key
- You will need to set the following environment variable to your key or you can set it to
user_providedfor users to provide their own.
ANTHROPIC_API_KEY=user_provided- You can determine which models you would like to have available with
ANTHROPIC_MODELS.
ANTHROPIC_MODELS=claude-fable-5-1,claude-fable-5,claude-opus-5,claude-opus-4-8,claude-opus-4-7,claude-sonnet-5,claude-sonnet-4-6,claude-opus-4-6,claude-opus-4-20250514,claude-3-7-sonnet-20250219,claude-3-5-sonnet-20241022,claude-3-5-haiku-20241022Notes:
- Claude Fable 5.1 and Fable 5 are included in LibreChat's default Anthropic model catalog. Fable/Mythos-class models use the modern Anthropic profile in LibreChat: 1M context, 128K max output, adaptive thinking, prompt caching, and
thinkingDisplaysupport for summarized or omitted reasoning output. Fable 5.1 keeps Fable 5's $10 input and $50 output rates per million tokens, with $12.50 cache writes and $0.25 cache reads. - Claude Opus 5 is available through direct Anthropic, Anthropic on Vertex AI, and AWS Bedrock. It has a 1M-token context window and 128K-token maximum output. Adaptive thinking is enabled unless explicitly disabled; when disabled, LibreChat limits
xhighormaxeffort tohighto keep requests valid. - Claude Sonnet 5 is available through direct Anthropic, Anthropic on Vertex AI, and AWS Bedrock. LibreChat assigns it a 1M-token context window and 128K-token maximum output, uses adaptive thinking with summarized display when thinking is enabled, and sends an explicit disabled setting when a user turns thinking off.
- Native Anthropic prompt-cache controls and 1M-context detection evaluate the configured Claude model ID directly. Compatible Sonnet and Opus IDs at version 4.6 or later, including matching later-version IDs, retain those controls without waiting for an exact catalog entry. Unsupported models keep prompt-cache controls hidden in the Agent Builder.
- Anthropic endpoint supports all Shared Endpoint Settings via the
librechat.yamlconfiguration file, includingstreamRate,headers,titleModel,titleMethod,titlePrompt,titlePromptTemplate, andtitleEndpoint - To configure Anthropic or an Anthropic-compatible gateway as a separate custom endpoint, use
provider: "anthropic".
Vertex AI
LibreChat supports running Anthropic Claude models through Google Cloud Vertex AI. This is useful if you:
- Already have Google Cloud infrastructure
- Want to use your existing GCP billing and credentials
- Need to comply with regional data residency requirements
Quick Setup (Environment Variables)
Set the following environment variables to enable Anthropic via Vertex AI:
# Enable Vertex AI mode for Anthropic
ANTHROPIC_USE_VERTEX=true
# Vertex AI region (optional, defaults to 'us-east5')
# Modern models such as Fable 5.1 and Opus 5 require global, us, or eu.
# Specific regions serve Sonnet 4.6 and earlier.
ANTHROPIC_VERTEX_REGION=global
# Path to Google service account key file (optional)
# If not specified, uses default path: api/data/auth.json
GOOGLE_SERVICE_KEY_FILE=/path/to/service-account.jsonPrerequisites
- Google Cloud Project with Vertex AI API enabled
- Service Account with the following roles:
Vertex AI User(roles/aiplatform.user)- Or
Vertex AI Administratorfor full access
- Claude models enabled in your Vertex AI Model Garden
- Service Account Key (JSON file) downloaded and accessible to LibreChat
Advanced Configuration
For model name mapping and advanced settings (similar to Azure OpenAI configuration), use the librechat.yaml file:
endpoints:
anthropic:
vertex:
region: global
models:
claude-fable-5-1:
deploymentName: claude-fable-5-1
claude-opus-5:
deploymentName: claude-opus-5
claude-sonnet-5:
deploymentName: claude-sonnet-5
claude-3.5-haiku:
deploymentName: claude-3-5-haiku@20241022For detailed YAML configuration options, see Anthropic Vertex AI Configuration.
How is this guide?