Skip to main content

Headers Reference

Request headers

Proxy headers

HeaderRequiredDescription
X-ASO-API-KeyYesYour AI SpendOps API key (aso_k_{id}.{secret})
X-ASO-DimsDependsDimension tags for cost attribution. Required if mandatory dimensions are enabled.

Provider headers (forwarded)

HeaderDescription
AuthorizationProvider API key (Bearer sk-...) — forwarded unchanged
x-api-keyAnthropic API key — forwarded unchanged
x-goog-api-keyGoogle API key — forwarded unchanged
anthropic-versionAnthropic API version — forwarded unchanged
Content-TypeRequest content type — forwarded unchanged

All other headers are forwarded unchanged to the upstream provider.

Stripped headers

The following headers are removed before forwarding to the provider:

PatternReason
X-ASO-*Proxy-specific, not needed upstream
CF-*Cloudflare internal headers
CDN-*CDN headers
HostReplaced with upstream host
True-Client-IPInfrastructure header
X-Forwarded-ForInfrastructure header
X-Forwarded-ProtoInfrastructure header
X-Real-IPInfrastructure header

Response headers

Proxy headers

HeaderDescription
X-ASO-Request-IdUUID generated by the proxy for this request

X-ASO-Request-Id

Every response includes this header containing a unique request identifier:

X-ASO-Request-Id: 550e8400-e29b-41d4-a716-446655440000

Use this for:

  • End-to-end tracing — match a response to its usage event in the analytics database
  • Deduplication — the same ID appears on the queued usage event
  • Support requests — quote the request ID when reporting issues

This is distinct from the provider's own request ID (e.g. OpenAI's chatcmpl-...), which is captured separately as generation_id in usage events.

Provider headers

All response headers from the upstream provider are returned to you unmodified.