API reference · Usage
Search the per request log
GET/api/logsSigned in session
A search inside a time window (at most 400 days; the last 7 by default) with filters, newest first, read on the account's own usage index and at most 2000 rows a page scanned; a page that scanned its share without filling says so in more: scan and its nextCursor looks further back. A bad filter is a 400 naming it. Also a session rollup (groupBy=session), one session's rows (session=) or a CSV export (format=csv).
Parameters
| Field | Type | What it is |
|---|---|---|
| from (query) | integer | Window start, epoch ms. |
| to (query) | integer | Window end, epoch ms. Default now. |
| model (query) | string | Model ids containing this text. |
| key (query) | integer | One key's number. |
| status (query) | string | A status class (2xx, 4xx, 5xx) or one status. |
| error (query) | string | An error type, such as rate_limit_exceeded. |
| request (query) | string | A request id, req_... |
| costMin (query) | integer | Billed cost at least, micro USD. |
| costMax (query) | integer | Billed cost at most, micro USD. |
| cursor (query) | string | Continue from a previous nextCursor. |
| limit (query) | integer | Default 50. From 1 to 200. |
| session (query) | string | One x-antimatter-session label's rows. |
| groupBy (query) | string | Return session rollups. One of "session". |
| format (query) | string | Return a CSV attachment. One of "csv". |
Answer 200
A page of the search, session rollups, or CSV.
| Field | Type | What it is |
|---|---|---|
| rows | array of LogRow | |
| rows[] | integer | |
| rows[] | integer | |
| rows[] | string | |
| rows[] | string | |
| rows[] | integer | |
| rows[] | integer | |
| rows[] | integer | |
| rows[] | integer | |
| rows[] | integer or null | |
| rows[] | integer or null | |
| rows[] | string or null | |
| nextCursor | string or null | |
| more | string or null | One of "rows", "scan", null. |
| scanned | integer or null | Rows the filters were checked on. |
| reachedTs | integer or null | How far back this page looked, epoch ms. |
| window | object | |
| window. | integer | |
| window. | integer | |
| errorTypes | array of string |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.