gateway api
Response headers
Every proxied response tells you how it was handled. These four headers make the gateway legible from your own logs — no dashboard required to answer 'what served this request?'
The legibility headers
| header | values | meaning |
|---|---|---|
x-understudy-request-id | UUIDv7 | The correlation id. It names the capture, appears in error envelopes, and is what support will ask for. |
x-understudy-mode | managed | byo | Whose credential paid for the upstream call. |
x-understudy-route | primary | understudy | fallback | Which arm served it: your provider, the routed/catalog model, or your provider after a routed attempt failed. |
x-understudy-effective-model | public model id | The model that actually ran, after any rewrite. Compare with the model your code requested. |
Using them
Log these four headers wherever you already log responses and you can answer, per request and without leaving your own observability: did the experiment arm serve this? did fallback fire during the incident? which model produced the output a user is asking about?
HTTP/2 200
x-understudy-request-id: 0190a7c2-7e11-7cc3-a312-9f1b22d40e88
x-understudy-mode: managed
x-understudy-route: understudy
x-understudy-effective-model: glm-5.1