Browse documentation

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

HeaderValuesMeaning
x-nr-routingdirect, fallback:<n>How the request was served. fallback:<n> means the nth fallback in the list served it.
x-nr-modelmodel nameThe model that actually served the request.
x-nr-attemptsnumberHow many provider calls the request took.
x-nr-latency-msmillisecondsOn a stream, the time to the first byte.

Cost

HeaderValuesMeaning
x-nr-request-costamountThe settled cost of the request. Absent — never 0 — when the model is unpriced.
x-nr-cost-statusexact, unpricedWhether the settled cost is an exact figure or the model has no price.

Cache

HeaderValuesMeaning
x-nr-response-cachehit, miss, bypassThe cache outcome for the request. See Response Caching.

Limits, auth, and guardrails (error responses)

HeaderValuesMeaning
x-nr-limit-sourcekey, plan, team, user, budget, capacity, plan_window_h8, plan_window_day, plan_window_week, plan_allowance_exhausted, plan_requiredWhich limit fired on a 429 or 402. See Limits.
x-nr-allowance-resettimestampWhen the exhausted allowance resets.
Retry-AftersecondsHow long to wait before retrying a 429.
x-nr-auth-reasonunauthorized, key_blocked, key_expired, key_route_not_allowed, key_model_not_allowed, key_ip_not_allowed, key_network_policy_invalid, auth_backend_unavailableWhy a 401 was returned.
x-nr-guardrailsblocked, unavailableblocked: 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?
Response Headers | nRouter