Skip to main content
Every response carries a request id. GET /v1/usage/{id} takes that id and answers with the usage record the dashboard would show for it: the token counts, what it cost, whether it was served, and how long it took. It reads the same record the Activity screen reads, so the two never disagree, and it needs only the API key, so a job can account for its own spend without anyone signing in.

Read one request back

Take the id from the x-hopscotch-request-id header of the response you want to look up, or from x-request-id, which carries the same value for the OpenAI SDKs, and ask for it:
200

The fields

The fields a customer never sees stay fenced out: nothing about our cost, our added latency, or how many attempts it took is in this record.

When a record is not found

One answer covers every miss. A request another key made, a request in a different workspace, and an id that never existed all get the same 404, so the endpoint cannot be used to probe for other people’s requests:
404
The first sentence is the one to act on. The record is written after the response has been sent to you, so a lookup fired the instant a response arrives can run ahead of it. Retry a 404 once after a short pause before treating it as missing. Records age out on the retention window described on Data and privacy. A request older than that is a 404 here too; its charge stays on your statement.

Next

Usage and metering

What one record holds and the outcome vocabulary.

View activity

The same record on the dashboard, with filters.
Every response carries the same id on two headers: x-hopscotch-request-id, which is ours, and x-request-id, which is the one the official OpenAI SDKs surface on their error objects. Every error envelope repeats it as request_id. Quote it when you ask us about a request. Without it we are guessing at which of your requests you mean.