Skip to content

Usage and billing history

Open Activity to review ledger entries and the purchase or invoice records available for your account. Use research results alongside these records: the ledger explains balance changes, while observations retain model, search, usage, and execution evidence.

Ledger entries contain signed credit and usage adjustments; temporary reservation movements are excluded. A purchase record includes its ID, status, credited cents, fee cents, total cents, and creation time. Invoice records instead report amounts paid and due in their original currency. An unknown invoice total stays unknown; an invoice alone does not establish how many credits were purchased or refunded.

Inspect field names before summing amounts. Ledger amounts use microdollars; purchases use USD cents; invoice amounts ending in _minor use their currency’s Stripe API units. One USD is 100 cents or 1,000,000 microdollars. A reservation protects credit while work is active or a charge is uncertain, and can differ from final reported usage.

A cancelled or failed observation can still have incurred cost. Null usage means the provider did not report a value; it is not a zero-cost result. If an outcome is unknown, preserve the observation and any hold while investigating.

With a key containing billing scope:

Terminal window
curl --fail-with-body \
-H "Authorization: Bearer $OPENSENPAI_API_KEY" \
'https://api.noticedbysenp.ai/api/v1/account/ledger/entries?limit=50'
curl --fail-with-body \
-H "Authorization: Bearer $OPENSENPAI_API_KEY" \
'https://api.noticedbysenp.ai/api/v1/account/purchases?limit=50'

The responses are {entries, next_cursor} and {purchases, next_cursor}. Accounts whose /api/v1/account response includes account.billing_backend: "schematic" use /api/v1/account/invoices instead of /api/v1/account/purchases; its response is {invoices, next_cursor}.

Each resource accepts limit from 1–100, defaulting to 50. Follow its own opaque cursor with the same limit until next_cursor is null. An empty page can still have a continuation when reservation rows are filtered out. Do not reuse or edit cursors between resources or accounts. Native cursors are signed; rotating the service’s Schematic secret invalidates them, so refresh the first page if that happens. Native offset pagination can overlap or change as late records are indexed; deduplicate by record ID and refresh the first page when investigating a recent charge.

Check whether payment processing has completed, whether a hold remains, whether usage is known, and whether the relevant run contains failed or unknown observations. Preserve purchase IDs and run IDs with your notes. Avoid submitting another checkout or paid run merely because a browser request failed; inspect the existing record and use its original idempotency key for recovery.

See credits and checkout and raw evidence for the two sides of that investigation.