Integrations
Cost API
Read request charges and export usage through the signed-in account surface. Inference keys do not grant account-management access.
Request usage
The account usage response includes request IDs, model IDs, key references, input/cached/output tokens, charge_nano, duration, outcome, and timestamps. Monetary values are decimal strings representing integer nano-USD.
Signed-in browser
const response = await fetch('/api/account/usage', {
credentials: 'same-origin'
});
if (!response.ok) throw new Error('Could not read usage');
const usage = await response.json(); This example runs on your signed-in platform origin. It uses the account session, not a public inference Bearer key.
Usage exports
| Route | Purpose |
|---|---|
| GET /api/account/usage | Account request metadata. |
| GET /api/account/usage.csv | Usage export. |
| GET /api/account/statement.csv | Retained financial statement. |
Amounts and time windows
One USD is 1,000,000,000 nano-USD. Preserve integer precision when reading monetary strings. Activity summaries cover the configured retention window; the retained ledger is the source for financial history.