Guides

Header Cheat Sheet

A helpful reference for all of the custom headers that Pay-i supports.

Headers marked as accepting multiple values expect a single header with one comma-separated string value (not multiple headers with the same name each containing a single value).

HeaderDescriptionMultiple Objects?SchemaSection
xProxy-Limit-IDsUsed to declare the limits which should be charged for the request.YesComma-separated string list of limit IDs (e.g., "limit1,limit2,limit3").Limits (Continued)
xProxy-Request-TagsFree form, custom strings used for later reference and data correlation.YesComma-separated string list of tags without spaces (e.g., "tag1,tag2,tag3").Request Tags
xProxy-User-IDA free form, custom string used to identify the user the request is associated with.NoSingle string value that uniquely identifies a user.UserIDs
xProxy-Logging-DisableWhen set to True Pay-i will not log the request or response details, but will still account for costs, errors, latency, and other metadata. Use this when a request contains sensitive information that your developers will not need to see in order to debug issues.NoBoolean string value: "True" or "False" (case-sensitive).payi_instrument
xProxy-Provider-BaseURIWhen using Pay-i as a proxy for a Provider, it will default to that Provider's SaaS endpoint. Use this header to change the Provider URI so Pay-i can proxy to a custom/hosted endpoint.

Note that Azure, Bedrock, and Google Vertex require the use of this header as they do not have generic API endpoints.
NoValid URI string including protocol (e.g., "https://custom-endpoint.example.com").Pay-i Proxy Configuration
xProxy-RouteAs-ResourceFor Azure OpenAI only. Azure OpenAI obfuscates the model that is deployed in your Azure resource. This header is used to tell Pay-i which resource is deployed so that the costs can be tabulated correctly.NoString value representing a resource name (e.g., "gpt-4").Azure OpenAI Provider Configuration
xProxy-Forward-*Used to forward custom headers to the Provider.-Any valid header format. The xProxy-Forward- prefix is removed before forwarding.Header Forwarding
xProxy-UseCase-IDA unique identifier associated with a Use Case Instance.NoString value representing a Use Case Instance ID (e.g., "12345678-90ab-cdef-1234-567890abcdef").Use Cases (Continued)
xProxy-UseCase-NameThe name of a Use Case, used when creating new Instances.NoString value representing a Use Case name (e.g., "summarization").Use Cases (Continued)
xProxy-UseCase-VersionVersion of a Use Case associated with each Instance.NoInteger or string representation of an integer (e.g., "3").Use Case Versioning