Observability

The one id you need: x-airouter-request-id

Every response carries it. Log it. When something is off:

  1. Open Requests in the dashboard.
  2. Paste the id into the filter.
  3. The row shows request body, response body (if raw capture is on), vendor, model, tokens, cost, latency, fallback, cache state, and error code.

What to log per call

FieldWhere
request_idx-airouter-request-id
vendor, modelx-airouter-vendor, x-airouter-model
cost_usdx-airouter-cost-usd
latency_msx-airouter-latency-ms
cachex-airouter-cache
fallbackx-airouter-fallback === '1'
end_userthe value you sent

A one-line structured log with these fields covers 90% of debugging.

Overview dashboard

Workspace → Overview shows:

  • Total cost, requests, tokens — current window.
  • Cost trend over time (sparkline + day bars).
  • P50 / P95 latency.
  • Top models by spend.
  • Top end users by spend (only populated if you set x-airouter-end-user).
  • Cache hit rate.

Request Inspector (super-admin)

For deep dives — the super-admin Requests panel adds raw payload inspection (when raw capture is on), full header dump, and per-request cost breakdown.

Latency

  • x-airouter-latency-ms is end-to-end at the gateway (includes upstream vendor time).
  • For pure vendor latency, subtract ~10–30ms of gateway overhead.
  • Use P95 on Overview to monitor — averages hide tail latency.

Error rate

Configure an error_rate alert (Workspace → Alerts). Fires when the rolling error rate over 5 minutes crosses your threshold.