You can proxy requests to Anthropic AI models through AI Gateway by creating AI Model Provider and AI Model entities. This reference documents all supported AI capabilities, configuration requirements, and provider-specific details needed for proper integration.
Anthropic provider
Upstream paths
AI Gateway automatically routes requests to the appropriate Anthropic API endpoints. The following table shows the upstream paths used for each capability.
Supported capabilities
The following tables show the AI capabilities supported by the Anthropic provider when configuring AI Models.
By default, AI Gateway uses the path templates shown in the tables below (e.g.,
/chat/completions,/embeddings, etc.). To customize these paths, configure theconfig.pathsfield in your AI Model entity. Custom paths take the form{configured_path}/{template_path}— for example, if you set a custom path of/v2, requests to/embeddingswould be routed to/v2/embeddings.
Text generation
Support for Anthropic text generation capabilities:
|
Capability |
Streaming |
Model example |
Path template |
Min version |
|---|---|---|---|---|
| generate | Supported | claude-sonnet-4-20250514 |
/chat/completions, /completions, or /responses
|
2.0 |
Batches
Support for Anthropic batch processing capabilities:
|
Capability |
Model example |
Path template |
Min version |
|---|---|---|---|
| batches1 | n/a |
/batches
|
2.0 |
1 Batches processing for Anthropic is supported in the native format from SDK only
Batches are configured on a separate AI Model with
type: "api", distinct from regular models that handle synchronous capabilities like generate and embeddings. Create a dedicated AI Model exclusively for batches and files, as each model must be either a regular model or an API model, not both.## Anthropic base URL
The base URL is https://api.anthropic.com:443/{capability_path}. The {capability_path} is determined by the AI capability.
AI Gateway uses this URL automatically. You only need to configure a URL if you’re using a self-hosted or Anthropic-compatible endpoint, in which case set the upstream_url option in your AI Model configuration.
Supported native LLM formats for Anthropic
By default, AI Gateway uses OpenAI-compatible request formats. Configure a native format in your AI Model to use Anthropic-specific APIs and features.
The following native Anthropic formats are supported:
|
LLM format |
Supported APIs |
|---|---|
anthropic
|
|
Provider-specific limitations for native formats
- Does not support embeddings
Statistics logging limitations for native formats
- No statistics logging for completions
Configure Anthropic
To use Anthropic with AI Gateway, configure a new AI Model Provider. You can then access supported AI Models from Anthropic.
Here’s a minimal configuration for chat completions: