API reference

API reference · Usage

Usage summary

GET/api/usageSigned in session

Parameters

Path and query parameters
FieldTypeWhat it is
window (query)stringDefault 7d. One of "24h", "7d", "30d".
series (query)stringdaily 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.

Fields of the 200 answer
FieldTypeWhat it is
totalsobject
totals.requestsinteger
totals.promptTokensinteger
totals.completionTokensinteger
totals.costMicrosintegerMicro USD, integer end to end.
totals.errorsinteger
byModelarray of object
byModel[].modelstring
byModel[].requestsinteger
byModel[].promptTokensinteger
byModel[].completionTokensinteger
byModel[].costMicrosinteger
byModel[].avgTtftMsnumber 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.

Antimatter