Available on all Portkey plans.
Three API Formats, Any Provider
Portkey supports three API formats. Each works with all providers — Portkey handles translation automatically.Chat Completions
OpenAI spec ·
POST /v1/chat/completionsWidest ecosystem compatibilityResponses API
OpenAI spec ·
POST /v1/responsesAgentic AI with built-in tool useMessages API
Anthropic spec ·
POST /v1/messagesNative Anthropic format across providersChat Completions — POST /v1/chat/completions
OpenAI-compatible format with the widest ecosystem support. Full guide →
Responses API — POST /v1/responses
OpenAI’s next-gen format for agentic AI with built-in tool use and reasoning. Full guide →
Messages API — POST /v1/messages
Anthropic-native format using the Anthropic SDK pointed at Portkey’s base URL. Full guide →
The Portkey SDK is a superset of the OpenAI SDK. The OpenAI SDK also works directly — point
base_url at https://api.portkey.ai/v1. For the Messages API, use the Anthropic SDK. See Model Catalog for provider setup.Switching Providers
Change the@provider/model string to switch between any provider. The API format stays the same.
Set up providers and credentials in the Model Catalog. The
@provider-slug in the model string routes requests to the correct provider automatically.Routing, Fallbacks, and Load Balancing
Configs enable routing strategies, fallbacks, and load balancing across providers.Local and Private Models
Route to local or private models withcustom_host. The model must be compatible with a supported provider format.
Include the version identifier (e.g.,
/v1) in the custom_host URL. Portkey appends the endpoint path (/chat/completions, /responses, etc.) automatically. For Ollama, see the Ollama integration.Supported Endpoints
Core Endpoints
- Chat Completions — OpenAI-compatible text generation with streaming, function calling, and multimodal inputs
- Responses API — Next-gen format with built-in tool use and reasoning
- Messages API — Anthropic-compatible endpoint across all providers
- Images — Generate, edit, and create image variations (DALL-E, gpt-image-1, Stable Diffusion)
- Audio — Speech-to-text and text-to-speech
Advanced Capabilities
- Fine-tuning — Customize models on specific datasets
- Batch Processing — Process large request volumes efficiently
- Files — Upload and manage files for fine-tuning and batch operations
- Moderations — Content safety and compliance checks
Additional Endpoints
- Gateway to Other APIs — Proxy requests to any provider endpoint
- Assistants API — OpenAI Assistants with persistent threads
- Completions — Legacy text completion endpoint
Multimodal Capabilities
Multimodal inputs work across all three API formats:- Vision — Image understanding across providers
- Function Calling — Tool use and function calling
- Image Generation — Text-to-image generation
- Speech-to-Text — Audio transcription
- Text-to-Speech — Audio generation
- Thinking / Reasoning — Extended reasoning modes
Not all providers support every endpoint or modality. See the provider compatibility matrix for details.

