Guides

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:

ProviderAutomatically Forwarded Headers
Anthropicx-api-key (starting with "anthropic-")
AWS Bedrockauthorization (starting with "amz-sdk")
OpenAIauthorization
Azure OpenAIauthorization, api-key

These headers are forwarded to their respective providers without requiring the xProxy-Forward- prefix.