GET /v1/requests— recent rows, newest first, with filtersGET /v1/requests/{id}— one row plus its captured, redacted payloadGET /v1/usage/stream— a live SSE feed of rows as they settle
Authorization: Bearer imp-rt-..., or the
x-api-key header). The dashboard calls the same endpoints with a WorkOS session
token. See Authentication for how keys are minted.
List requests
Returns request log rows for your account,ts descending.
Response (row abbreviated)
null,
an errorMessage, and an attempts failover trail. Costs are in credits, where
1 credit = $0.000001.
Filters
Errors only, one model
Paging with before_id
Page backward with a keyset cursor: pass the id of the oldest row you already hold
as before_id to get the rows strictly older than it. The cursor keys off the
row’s id, not its timestamp, so rows that share a millisecond are never skipped and
the boundary row does not come back:
since and before_id compose. Keep a since filter on every page to bound how
far back paging runs: the window is at/after since and strictly older than the
oldest row you hold.
One request with its payload
Fetch a single row plus the captured request and response bodies. An id that does not exist, or belongs to another account, returns404 (never leaks across
accounts).
Response
payload is null if no bodies were captured for that request. What the
gateway captures is scrubbed before it is stored:
- Sensitive headers are redacted.
authorization,x-api-key,x-goog-api-key,cookie, andset-cookieare stored as[redacted]. - Inline media is stripped.
data:URIs and large base64 blobs (images, files) are replaced with a[media omitted (N chars)]placeholder. - Oversized bodies are truncated. Bodies are capped near 256 KB; when a body
is shrunk to fit,
truncatedistrue. The stored JSON is always valid.
Live stream
GET /v1/usage/stream is a long-lived text/event-stream. On connect it sends
one snapshot event, then one request event per settled or failed request.
Pass -N to curl so it prints frames as they arrive.
v: 1. Payloads are never streamed, only log rows.
Stream (abridged)
snapshot— the last 20 rows, the currentbalanceCredits, the server-authoritative month-to-date totals (tokens,spentCredits,requests, ok-only), andcutoff, the read time the totals were computed at. Gate any streamed rows againstcutoffso live ticks never re-add rows the snapshot already counted.request(live) — a newly settled or failed row plusbalanceCredits, the account balance after that request.request(buffered replay) — a request that settled between subscribe and the snapshot read is replayed once right after the snapshot withoutbalanceCredits(its balance could be staler than the snapshot’s). The snapshot balance stands until the next live frame ticks it forward.: hb— a comment heartbeat about every 25s that keeps the connection under the load balancer’s idle timeout. It carries no data.
balanceCredits, spentCredits, a row’s costCredits) are in
credits, where 1 credit = $0.000001.
