speko.usage.
speko.usage.get(params?)
Signature
UsageQueryParams
| Field | Type | Description |
|---|---|---|
from | string? | ISO-8601 start date. Omit to default to the current billing start. |
to | string? | ISO-8601 end date. Omit to default to now. |
Returns — UsageSummary
| Field | Type | Description |
|---|---|---|
totalSessions | number | Distinct sessions in range. |
totalMinutes | number | Total audio minutes billed. |
totalCost | number | Total cost in USD. |
breakdown | UsageByProvider[] | Per-provider rollup (see below). |
balanceMicroUsd | string | Current organization balance in micro-USD (1_000_000 µ1), string-encoded for JSON safety. |
balanceUsd | number | Same balance, pre-divided for display. |
UsageByProvider
| Field | Type | Description |
|---|---|---|
provider | string | Upstream provider id. |
type | 'stt' | 'llm' | 'tts' | Modality. |
metric | string | The billable metric (e.g. minutes, characters, tokens). |
keySource | 'BYOK' | 'MANAGED' | BYOK = customer key, no Speko margin. MANAGED = platform key, billed to org. |
quantity | number | Billed quantity in the metric’s unit. |
cost | number | Cost in USD. |