GuidesResponse Headers
Response Headers
Every nRouter response header in one place: routing, model, attempts, cost, cache, limits, auth and guardrails — and what each value means.
Every nRouter response carries its routing and settlement facts as headers, so a client can see which model served the request, how many attempts it took, what it cost, and — when a request is refused — exactly which limit or policy fired. This page is the single reference for the x-nr-* header set.
Routing and serving
| Header | Values | Meaning |
|---|---|---|
x-nr-routing | direct, fallback:<n> | How the request was served. fallback:<n> means the nth fallback in the list served it. |
x-nr-model | model name | The model that actually served the request. |
x-nr-attempts | number | How many provider calls the request took. |
x-nr-latency-ms | milliseconds | On a stream, the time to the first byte. |
Cost
| Header | Values | Meaning |
|---|---|---|
x-nr-request-cost | amount | The settled cost of the request. Absent — never 0 — when the model is unpriced. |
x-nr-cost-status | exact, unpriced | Whether the settled cost is an exact figure or the model has no price. |
Cache
| Header | Values | Meaning |
|---|---|---|
x-nr-response-cache | hit, miss, bypass | The cache outcome for the request. See Response Caching. |
Limits, auth, and guardrails (error responses)
| Header | Values | Meaning |
|---|---|---|
x-nr-limit-source | key, plan, team, user, budget, capacity, plan_window_h8, plan_window_day, plan_window_week, plan_allowance_exhausted, plan_required | Which limit fired on a 429 or 402. See Limits. |
x-nr-allowance-reset | timestamp | When the exhausted allowance resets. |
Retry-After | seconds | How long to wait before retrying a 429. |
x-nr-auth-reason | unauthorized, key_blocked, key_expired, key_route_not_allowed, key_model_not_allowed, key_ip_not_allowed, key_network_policy_invalid, auth_backend_unavailable | Why a 401 was returned. |
x-nr-guardrails | blocked, unavailable | blocked: the request was refused by a guardrail and no provider call was made. unavailable: the request was refused unjudged because the guardrail check itself was unavailable. |
Frequently asked questions
Was this page helpful?