Passthrough vs standard providers
With standard providers like Anthropic or OpenAI, Portkey validates and transforms your request to match the expected API signature. With Passthrough, your request body is forwarded directly to the target endpoint without any modifications.
When to use Passthrough
- Provider-specific parameters: When you need to use parameters that aren’t in Portkey’s standard API signatures
- Direct API access: When you want to interact with a provider’s API exactly as documented
- Custom integrations: When working with endpoints or features not yet mapped by Portkey
- Debugging: When you need to see exactly what the provider receives
Quick start
cURL
Required headers
Header forwarding
All headers except those starting withx-portkey- are forwarded to the target endpoint. This includes:
authorization- Your target provider’s API keyContent-Type- Request content type- Any custom headers your endpoint requires
Configuration
Passthrough requires you to specify the target endpoint using thex-portkey-custom-host header. This tells Portkey where to forward your requests.
/chat/completions) is appended to this base URL.
How it works
When you use the Passthrough provider with any unified route (like/v1/chat/completions or /v1/messages), Portkey:
- Receives your request as-is without validating against standard parameter signatures
- Forwards the entire request body directly to the configured backend
- Returns the response from the provider without transformation
Example: Standard vs Passthrough
Standard provider (Anthropic):Header behavior
When you send a request through Passthrough:
This allows you to pass authentication and custom headers directly to your target provider.
Supported routes
Passthrough works with all unified routes:/v1/chat/completions- Chat completions/v1/messages- Anthropic-style messages/v1/completions- Text completions/v1/embeddings- Embeddings- Any other supported endpoint
Use cases
Provider-specific features
Use parameters that are unique to a specific provider:Self-hosted vLLM or custom endpoints
Connect to your own vLLM deployment or any OpenAI-compatible endpoint:cURL
Gateway features
Passthrough requests still benefit from Portkey’s gateway features:- Observability: Full logging and monitoring of requests/responses
- Caching: Response caching works as expected
- Rate limiting: Budget and rate controls apply
- Retries: Automatic retry logic on failures
- Fallbacks: Configure fallback providers in your config
Next steps
Add Metadata
Add metadata to your Passthrough requests
Gateway Configs
Configure fallbacks, retries, and caching
Tracing
Trace your Passthrough requests
Model Catalog
Set up your Passthrough provider

