API reference · Usage
Usage summary
GET/api/usageSigned in session
Parameters
| Field | Type | What it is |
|---|---|---|
| window (query) | string | Default 7d. One of "24h", "7d", "30d". |
| series (query) | string | daily for a daily series instead of the summary, compress for the prompt tokens x-antimatter-compress saved per UTC month over the last six. One of "daily", "compress". |
Answer 200
Totals and a per model breakdown, a daily series, or compression savings by month.
| Field | Type | What it is |
|---|---|---|
| totals | object | |
| totals. | integer | |
| totals. | integer | |
| totals. | integer | |
| totals. | integer | Micro USD, integer end to end. |
| totals. | integer | |
| byModel | array of object | |
| byModel[] | string | |
| byModel[] | integer | |
| byModel[] | integer | |
| byModel[] | integer | |
| byModel[] | integer | |
| byModel[] | number or null |
Errors
- 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.