Documentation Index
Fetch the complete documentation index at: https://mintlify.com/portkey-AI/gateway/llms.txt
Use this file to discover all available pages before exploring further.
What are Providers?
Providers in Portkey AI Gateway are integrations with AI model providers like OpenAI, Anthropic, Google, AWS Bedrock, and more. The gateway acts as a unified interface, allowing you to:- Route to 250+ models from a single API
- Switch providers without changing your code
- Implement fallbacks across different providers
- Load balance between multiple providers
- Compare models from different providers side-by-side
How Routing Works
Portkey uses a unified OpenAI-compatible API format. When you make a request:- Specify the provider using the
providerheader or config - Gateway transforms your request to the provider’s format
- Provider responds and gateway transforms it back to OpenAI format
- You receive a consistent response structure
Basic Routing Example
Advanced Routing with Configs
Use configs for sophisticated routing strategies:Fallback Routing
Automatically fallback to another provider if the primary fails:Load Balancing
Distribute requests across multiple providers:Conditional Routing
Route based on request properties:Provider Authentication
Each provider requires authentication. You can provide credentials in multiple ways:1. Direct Header
2. Provider-Specific Headers
3. Config-Based
4. Virtual Keys (Enterprise)
Store keys securely in Portkey and reference them:Supported Features by Provider
Different providers support different features:| Feature | OpenAI | Anthropic | Azure | Bedrock | Gemini | Cohere |
|---|---|---|---|---|---|---|
| Chat Completions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Streaming | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Embeddings | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
| Image Generation | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ |
| Function Calling | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Vision | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| Audio | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
Provider-Specific Headers
Some providers support additional headers:OpenAI
OpenAI-Organization: Organization IDOpenAI-Project: Project IDOpenAI-Beta: Beta features
Anthropic
anthropic-version: API version (default: 2023-06-01)anthropic-beta: Beta features
Azure OpenAI
api-key: Azure API keyapi-version: API version (required)
AWS Bedrock
- AWS credentials via environment variables or IAM roles
awsRegion: AWS regionawsAccessKeyId,awsSecretAccessKey,awsSessionToken
Next Steps
Supported Providers
View the complete list of 78+ supported providers
OpenAI Integration
Learn about OpenAI integration
Fallback Routing
Implement automatic fallbacks
Load Balancing
Distribute requests across providers