Header Forwarding
Some Providers may expose new features or settings that require you to send them additional headers as part of making a request.
When using Pay-i as a proxy, any headers sent to the Pay-i service with the xProxy-Forward- prefix are forwarded to the Provider as-is, without inspection or modification.
For example, if you needed to send a header named BatchMode with the value True to the Provider, you would include a header to Pay-i as follows:
“xProxy-Forward-BatchMode”: “True”You can use xProxy-Forward- when using either the extra_headers or default_headers techniques for passing Pay-i headers.
Provider-Specific Header Forwarding
In addition to custom headers with the xProxy-Forward- prefix, Pay-i automatically forwards certain provider-specific headers:
| Provider | Automatically Forwarded Headers |
|---|---|
| Anthropic | x-api-key (starting with "anthropic-") |
| AWS Bedrock | authorization (starting with "amz-sdk") |
| OpenAI | authorization |
| Azure OpenAI | authorization, api-key |
These headers are forwarded to their respective providers without requiring the xProxy-Forward- prefix.
Updated 2 days ago
