Overview
Bifrost provides complete Anthropic API compatibility through protocol adaptation. The integration handles request transformation, response normalization, and error mapping between Anthropic’s Messages API specification and Bifrost’s internal processing pipeline. This integration enables you to utilize Bifrost’s features like governance, load balancing, semantic caching, multi-provider support, and more, all while preserving your existing Anthropic SDK-based architecture. Endpoint:/anthropic
Setup
- Python
- JavaScript
Provider/Model Usage Examples
Use multiple providers through the same Anthropic SDK format by prefixing model names with the provider:- Python
- JavaScript
Adding Custom Headers
Pass custom headers required by Bifrost plugins (like governance, telemetry, etc.):- Python
- JavaScript
Using Direct Keys
Pass API keys directly in requests to bypass Bifrost’s load balancing. You can pass any provider’s API key (OpenAI, Anthropic, Mistral, etc.) since Bifrost only looks forAuthorization or x-api-key headers. This requires the Allow Direct API keys option to be enabled in Bifrost configuration.
Learn more: See Key Management for enabling direct API key usage.
- Python
- JavaScript
Async Inference
Submit inference requests asynchronously and poll for results later using thex-bf-async header. This is useful for long-running requests where you don’t want to hold a connection open. See Async Inference for full details.
Async inference requires a Logs Store to be configured and is not compatible with streaming.
Messages
- Python
- JavaScript
Async Headers
| Header | Description |
|---|---|
x-bf-async: true | Submit the request as an async job. Returns immediately with a job ID. |
x-bf-async-id: <job-id> | Poll for results of a previously submitted async job. |
x-bf-async-job-result-ttl: <seconds> | Override the default result TTL (default: 3600s). |
Supported Features
The Anthropic integration supports all features that are available in both the Anthropic SDK and Bifrost core functionality. If the Anthropic SDK supports a feature and Bifrost supports it, the integration will work seamlessly.Next Steps
- Files and Batch API - File uploads and batch processing
- OpenAI SDK - GPT integration patterns
- Google GenAI SDK - Gemini integration patterns
- Configuration - Bifrost setup and configuration
- Core Features - Advanced Bifrost capabilities

