Browse documentation

Response Headers

Explore every nRouter response header in one guide: routing, model, attempts, exact cost, cache status, limits, and guardrails with full definitions.

Every nRouter API response carries execution, routing, and billing metadata directly in the x-nr-* header namespace. Clients can inspect which model served the request, how many attempts it took, exact cost settlement, and — when a request is refused — precisely which limit or policy fired. This page is the single authoritative reference for all x-nr-* response headers.

Routing & Token Telemetry

HeaderValuesMeaning
x-nr-request-idUUID stringUnique request identifier emitted on every response.
x-nr-routingdirect, fallback:<n>How request served; <n> indicates nth fallback entry answered.
x-nr-modelmodel namePhysical model that served the request.
x-nr-attemptsnumberTotal provider calls attempted (≥ 1).
x-nr-latency-msmillisecondsEdge arrival to first emitted byte.
x-nr-input-tokens / x-nr-output-tokens / x-nr-total-tokensnumberToken volume reported by upstream provider.

Cost & Cache

HeaderValuesMeaning
x-nr-request-costUSD amountSettled cost; absent (never 0) on unpriced models.
x-nr-cost-statusexact, unpricedEmitted on every served response.
x-nr-response-cachehit, miss, bypassCache outcome (see Response Caching).

Limits, Auth & Guardrails

HeaderValuesMeaning
x-nr-limit-sourcekey, plan, team, budget, etc.Triggering limit on 429 or 402 (see Limits).
x-nr-allowance-resetsecondsInteger seconds until tightest allowance window resets.
Retry-AftersecondsCooldown interval before retrying a 429.
x-nr-auth-reasonunauthorized, key_blocked, etc.Reason code emitted on 401 or 403 responses.
x-nr-guardrailsnone, monitor, pass, redacted, partial, blocked, unavailableGuardrail verdict (blocked incurs $0 spend).

Frequently asked questions

Why is x-nr-request-cost missing from my response?

The model is unpriced, so x-nr-request-cost is omitted and x-nr-cost-status reads unpriced.

What does x-nr-routing: fallback:2 mean?

The primary model was unavailable and the second entry in your fallback chain served the request.

Where are the error codes that go with these headers?

See Errors & Rate Limits for all HTTP status and application error codes.

Was this page helpful?