API reference · API
One request, by its id
GET/v1/requests/{id}API key
The usage row of a request this key made, by the x-antimatter-request-id (or x-request-id) its answer carried: model, status, tokens, what it was billed, timing and the error it was answered with. Only the key that made it may read it; every other id, and a request refused before dispatch (which keeps no row), is the same 404 with code request_not_found. Takes the read scope.
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | string | The request id. |
Answer 200
The request.
Headers: x-antimatter-request-id, x-request-id
| Field | Type | What it is |
|---|---|---|
| id | string | The request id. |
| object | "request" | |
| created | integer | Unix seconds. |
| model | string | The model that served or last failed it. |
| upstream | string | |
| status | integer | The status the caller was answered with. |
| cached | boolean | |
| attempts | integer | Upstream attempts behind it. |
| usage | object | |
| usage. | integer | |
| usage. | integer | |
| usage. | integer | |
| cost_micros | integer | What it was billed, in micro dollars. |
| cost | number | The same, in dollars. |
| ttft_ms | integer or null | |
| total_ms | integer or null | |
| session | string or null | Its x-antimatter-session label. |
| error | object or null | The error the caller was answered with, the message truncated. |
| error. | string | |
| error. | string |
Errors
- 401OpenAI shaped error.
- 403OpenAI shaped error.
- 404OpenAI shaped error.
- 429Rate limited, or a spent budget or spend cap. The type distinguishes rate_limit_error, policy_exceeded, and spend_cap_exceeded.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.