API reference

API reference · Credits

Monthly statement

GET/api/credits/statementSigned in session

Opening balance, deposits, spend by model and by key, deposit receipts, closing balance. Rendered from the ledger and the meter rather than stored, so it cannot drift from either. Holds are excluded throughout.

Parameters

Path and query parameters
FieldTypeWhat it is
month (query)stringThe period.
orgId (query)integerAn organization's statement instead of your own.
format (query)stringDownload format. One of "json", "csv".

Answer 200

The statement, as a download.

The answer's fields are not named in the document.

Errors

  • 400OpenAI shaped error.
  • 401OpenAI shaped error.
  • 403OpenAI shaped error.
  • 404OpenAI 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