Headers & metadata

/docs/headers

X-Relixr-* response headers — routing decision, cost, latency, failover, and provider fields on every gateway response.

X-Relixr headers

Every response from the Relixr gateway includes a set of X-Relixr-* headers. These are the primary audit trail for every routing decision — readable from any HTTP client, no SDK required.

HeaderWhat it contains
X-Relixr-ProviderThe upstream provider that served the request (e.g. openai, anthropic)
X-Relixr-ModelThe model that ran, as returned by the provider
X-Relixr-Latency-MsUpstream time-to-first-token in milliseconds — excludes Relixr overhead
X-Relixr-Failovertrue if the first-choice provider failed and a backup was used
X-Relixr-Estimated-CostEstimated cost in USD at provider list price
X-Relixr-Estimated-CreditsSame cost expressed in Relixr credits
X-Relixr-Cachehit or miss when semantic caching is active
X-Relixr-Cache-AgeSeconds since the cached response was stored

To inspect all headers in one command:

curl https://api.relixr.com/v1/chat/completions \
  -H "Authorization: Bearer $RELIXR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"hi"}]}' \
  -sD - | grep -i "x-relixr"

Request id

Gateway responses include a request id you can paste into Help or /dashboard/usage/[requestId]. Prefer the JSON body id / Relixr extension when present; also look for X-Request-Id on HTTP responses when emitted by the gateway.

Cost & routing

Successful chat completions may include a relixr object in the JSON response body with routing decision and cost fields for reconciliation. See Model routing.

The X-Relixr-Latency-Ms header reports upstream latency only. To measure Relixr's own overhead, subtract this from your client-side round-trip time. See How Relixr routes requests for the full accounting.

Deprecation

Retired model ids may emit Deprecation / Sunset headers. See Deprecation policy.

Was this helpful?

Still stuck? Help center · Doctor