Provider authentication
Pass the provider’s API key using the standardAuthorization header, paired with the x-portkey-provider header to tell the gateway which provider to route to.
Authorization is forwarded to the target provider as-is.
Portkey hosted service
When using the Portkey Cloud, pass your Portkey API key using thex-portkey-api-key header instead of managing provider credentials directly. Portkey’s virtual key system handles credential management on the backend.
Virtual keys let you store provider API keys in Portkey’s secure vault and reference them by name. See the Portkey documentation for virtual key setup.
Examples
Config-based authentication
When using thex-portkey-config header, provider credentials can be embedded directly in the config object instead of passed via Authorization.
AWS Bedrock authentication
For AWS Bedrock, pass AWS credentials via dedicated headers instead ofAuthorization: