Request IDs
Trace any response to its usage and charge.
Every response — success or error, streaming or not — carries an x-request-id header with a Top Billing request id such as tb_req_01J8Z…. Error bodies repeat it as request_id.
HTTP/1.1 200 OK
content-type: application/json
x-request-id: tb_req_01J8Z4KQ...
x-ratelimit-remaining-requests: 59
What it connects
The same id is on the request’s usage row, its reservation and its ledger entries. In Usage you can search for it to find the request’s tokens, status and charge.
Reading it from an SDK
raw = client.chat.completions.with_raw_response.create(model="<model-id>", messages=messages)
print(raw.headers.get("x-request-id"))
completion = raw.parse()
Quote the request id whenever you contact support: it lets us find the exact request, its usage and its charge without you sending any prompt text.