Provider routing
Anthropic Claude Messages proxy for /v2 callers
Route shared messages to Anthropic's native Messages API without changing client contracts.
Teams adding Claude behind the same tenant-secret proxy used for other providers.
The problem
Anthropic Messages has native system and max_tokens requirements that differ from OpenAI-compatible chat routes.
How LLM Proxy helps
LLM Proxy maps shared messages into Anthropic's native Messages API, translates system messages to the top-level system field, and sends configured output limits when needed.
How it works
- Configure providers.anthropic.api_key, base_url, and Claude model catalog.
- Select provider=anthropic or use the claude alias.
- Send messages through /v2 with user and optional system messages.
- Let omitted max_tokens use the selected Claude model's configured output limit.
Feature-to-benefit table
| Feature | Why it matters here | Example |
|---|---|---|
| Native Claude routing | The proxy uses Anthropic Messages rather than treating Claude as a generic compatible chat endpoint. | Provider semantics stay server-side. |
| System translation | Shared system messages become Anthropic's top-level system field. | Clients keep the v2 messages contract. |
| Output limits | Claude model output_token_limit values are required and validated. | Invalid max_tokens values fail before upstream calls. |
Use-case examples
Writing assistant
A tool routes a /v2 writing request to provider=anthropic.
Default Claude route
A tenant sets Anthropic as the default provider so callers can omit provider.
Max-token guard
A caller's requested max_tokens above the configured Claude limit returns 400.
Objections and limitations
- Anthropic dictation is not supported through /dictate.
- Web search is not marked supported for Anthropic in the current proxy catalog.
- The model catalog must include output token limits for Claude models.
FAQ
What is the main job of Anthropic Claude Messages proxy?
LLM Proxy maps shared messages into Anthropic's native Messages API, translates system messages to the top-level system field, and sends configured output limits when needed.
Who should read this provider routing resource?
Teams adding Claude behind the same tenant-secret proxy used for other providers.
Does this page claim provider performance or pricing advantages?
No. The supported claim is about LLM Proxy's documented routing, configuration, management, security, usage, and deployment contracts. Provider cost, speed, rankings, and benchmark claims are not made here.
Where should setup details come from?
Use the main README and implementation notes for current command, config, and endpoint details. This page summarizes the workflow without replacing LLM Proxy documentation.
What should I read next?
A closely related resource is Integrate once through one multi-provider LLM proxy, which covers multi-provider LLM proxy.
Related resources
Use this pattern in LLM Proxy
Start from the canonical API reference, then use the management surface when the workflow needs tenant or provider configuration.
Open API reference