Skip to main content
Open logs in the console, select a request, and check its status, model, provider, latency, tokens, and cost. Use usage for totals across a time window. Logs belong to the key’s workspace and include successful and failed model requests. Authentication failures can happen before logging starts. The usage ledger is separate: it records settled usage rather than every failed attempt.

List requests

The response has a 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.
For the next page, keep the same filters and pass the oldest row’s 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’s id into the URL:
The response contains 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.
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.
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

This stream sends log rows, never captured payloads. Every data frame contains 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.