Returns the actual usage of a single request — token counts and cost — identified by its request ID (the X-Request-Id response header value, prefixed with REQ-). Useful for reconciling the real billing of a single call once it completes, e.g. asynchronous video generation tasks.
A request that failed over between providers produces multiple ledger entries: failed attempts are voided (status is upstream_failed, cost 0) and the final successful one is billed. All entries are returned, ordered by creation time ascending.
Return the ledgers (tokens + cost) produced by one gateway request, identified by the request_id query parameter (the X-Request-Id response header value, REQ-...). Fields match the dashboard ledger view. A request that failed over between providers produces multiple ledgers (voided attempts + the final billed one). API key only.
🔑
Bearer API KeyUse the Authorization: Bearer sk_live_... header; x-api-key is also supported.
Request structure
The section below confirms the method, URL and authentication scheme. It is an HTTP structure snippet, not a standalone runnable example.
HTTP
GET https://www.silvamux.com/api/business/v1/customer/request-usage
Authorization: Bearer $SILVAMUX_API_KEY
Request parameters
Parameter
Type & location
Required
Description
Authorization
string · header
Yes
Bearer API Key (sk_live_...)
X-Organization-Id
string · header
No
Not required for API key auth
request_id
string · query
Yes
Request ID from the X-Request-Id response header (REQ-...)
Response
200OK
application/json · CustomerRequestUsageResponse
Field
Type
Required
Description
$schema
string (uri)
No
A URL to the JSON Schema for this object.
ledgers
array<CustomerRequestUsageEntry>
Yes
Ledgers produced by this request, ordered by created_at asc
ledgers.cost_points
string
Yes
Cost in points after discount
ledgers.created_at
string (date-time)
Yes
Ledger creation time (RFC3339)
ledgers.first_token_latency_ms
integer (int64)
Yes
Time to first token in ms (streamed requests; 0 = unrecorded)