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
| Header | Values | Meaning |
|---|---|---|
x-nr-request-id | UUID string | Unique request identifier emitted on every response. |
x-nr-routing | direct, fallback:<n> | How request served; <n> indicates nth fallback entry answered. |
x-nr-model | model name | Physical model that served the request. |
x-nr-attempts | number | Total provider calls attempted (≥ 1). |
x-nr-latency-ms | milliseconds | Edge arrival to first emitted byte. |
x-nr-input-tokens / x-nr-output-tokens / x-nr-total-tokens | number | Token volume reported by upstream provider. |
Cost & Cache
| Header | Values | Meaning |
|---|---|---|
x-nr-request-cost | USD amount | Settled cost; absent (never 0) on unpriced models. |
x-nr-cost-status | exact, unpriced | Emitted on every served response. |
x-nr-response-cache | hit, miss, bypass | Cache outcome (see Response Caching). |
Limits, Auth & Guardrails
| Header | Values | Meaning |
|---|---|---|
x-nr-limit-source | key, plan, team, budget, etc. | Triggering limit on 429 or 402 (see Limits). |
x-nr-allowance-reset | seconds | Integer seconds until tightest allowance window resets. |
Retry-After | seconds | Cooldown interval before retrying a 429. |
x-nr-auth-reason | unauthorized, key_blocked, etc. | Reason code emitted on 401 or 403 responses. |
x-nr-guardrails | none, monitor, pass, redacted, partial, blocked, unavailable | Guardrail 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.