tutorials
First captured request
Fifteen minutes, no application changes: sign up, send one request through the gateway, and read the recorded evidence in the dashboard. Everything else Understudy does builds on the loop you'll close here.
1 — Sign up and save the starter key
Sign in at app.understudylabs.com and name your workspace. The handoff screen shows your starter sk_* key — copy it now; the plaintext is never shown again. You land on the Setup page with the key prefilled.
export UNDERSTUDY_API_KEY="sk_live_..." # the starter key2 — Turn capture on
Captures are opt-in per workload. Open Projects → rehearsal → Workloads and flip capture on for the main workload — the one unscoped traffic resolves to.
3 — Send the request
Pick your path on the Setup page (both end here identically). With an Anthropic key of your own, the BYO smoke test is:
curl https://api.understudylabs.com/v1/messages \
-H "x-api-key: $UNDERSTUDY_API_KEY" \
-H "x-understudy-upstream-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-haiku-4-5","max_tokens":32,"messages":[{"role":"user","content":"Say ok."}]}'Without a provider key, use managed mode against a catalog model instead (ids from GET /v1/models or the Models page):
curl -i https://api.understudylabs.com/v1/chat/completions \
-H "Authorization: Bearer $UNDERSTUDY_API_KEY" \
-H "content-type: application/json" \
-d '{"model":"glm-5.1","max_tokens":32,"messages":[{"role":"user","content":"Say ok."}]}'4 — Read the response headers
With -iyou'll see the gateway's legibility headers alongside the provider's normal response:
x-understudy-request-id: 0190... ← the capture's name
x-understudy-mode: managed ← whose credential paid
x-understudy-route: understudy ← which arm served it
x-understudy-effective-model: glm-5.1 ← what actually ran5 — Find the capture
Open rehearsal → Captures. Your request is the top row within seconds; the request id matches the header. Open it:
- metadata — status, first-byte latency, workload, requested vs served model, mode.
- request / response tabs — the raw bodies, byte for byte. This is the evidence evals and fine-tuning are built from.