List requests
data array, newest first. Useful fields include:
Divide credits by 1,000,000 to get dollars. A
null cost means no cost was recorded; zero means a recorded zero-credit charge. HTTP 200 on a stream does not prove success: check status too.
Filters and pagination
Filters and pagination
id as before_id. Continue until you get a short or empty page. An unknown cursor returns an empty page; an empty cursor value returns 400. Do not use timestamps as cursors: requests can share a timestamp.One request with its payload
Copy a log row’sid into the URL:
request (the log row) and payload (captured request body, response body, and headers). payload can be null. A missing request or one outside your workspace returns 404.
Prompts and responses can be stored in request logs. Credential headers are redacted, inline media is stripped, and oversized bodies are truncated near 256 KB. This does not remove all sensitive text from prompts and responses. Only send content you intend to share with your workspace and the serving provider.
Correlate with application logs
Correlate with application logs
Send an
x-request-id header with your own correlation ID. It is recorded in the log row’s requestId field; without one, the gateway generates a value.requestId and id are different. Fetch request details using the row’s id. Use a fresh correlation ID for each attempt, and keep credentials and sensitive prompt text out of your application’s diagnostic logs.Export a window to CSV
Set your filters in the console’s logs view and choose export csv. The export includes the full filtered window, not only the loaded page.Export format and API access
Export format and API access
Timestamps are ISO strings, durations are milliseconds, and dollar costs have six decimal places. Missing values are empty cells rather than zero.
audio_input_seconds explains transcription charges when token counts are zero.There is no separate public export endpoint. To build an export, page through GET /v1/requests with the same since, status, and model filters and advance before_id using the oldest row on each page. Check each response for errors before advancing.Use decimal formatting with six places for dollar columns so small charges are not rounded to zero. Keep the original integer credit value if you need exact arithmetic.Live stream
Subscribe to live usage over SSE
Subscribe to live usage over SSE
v: 1.A buffered replay immediately after the snapshot can omit
balanceCredits; keep the snapshot balance until a live update arrives. Gate rows against the snapshot’s cutoff so you do not double-count usage already in its totals. Reconcile with a new snapshot after reconnecting. All credit amounts are micro-USD.
