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
| Field | Type | What it is |
|---|---|---|
| month (query) | string | The period. |
| orgId (query) | integer | An organization's statement instead of your own. |
| format (query) | string | Download 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.