Count accepted consume/confirm events including zero-cost calls. Aggregate valid reported tokens and provider costs, identifying missing or invalid reports. Reservations and refunds do not add usage events.
SDK 0.0.1Updated
Make the request
Count accepted consume/confirm events including zero-cost calls. Aggregate valid reported tokens and provider costs, identifying missing or invalid reports. Reservations and refunds do not add usage events.
Credential
Server API key only. Call from your trusted backend.
Permission
credits:read
Set the base URL and App ID from SDK setup. These examples use placeholders and do not execute requests. Never put a server key in browser code.
The kind value for this operation. Its accepted type and constraints are listed above and below.
fromdate-timeOptional
The from value for this operation. Its accepted type and constraints are listed above and below.
todate-timeOptional
The to value for this operation. Its accepted type and constraints are listed above and below.
days1 | 7 | 30 | 90Optional
The days value for this operation. Its accepted type and constraints are listed above and below.
membershipIduuidOptional
The membershipId value for this operation. Its accepted type and constraints are listed above and below.
countintegerOptional
The count value for this operation. Its accepted type and constraints are listed above and below.
min: 1 · max: 12
includeCurrentbooleanOptional
The includeCurrent value for this operation. Its accepted type and constraints are listed above and below.
timezonestringRequired
The timezone value for this operation. Its accepted type and constraints are listed above and below.
maxLength: 100
filterByarrayRequired
The filterBy value for this operation. Its accepted type and constraints are listed above and below.
maxItems: 5
Show child fields
keystringRequired
The key value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^[a-z][a-z0-9_]{0,63}$
valuesarrayRequired
The values value for this operation. Its accepted type and constraints are listed above and below.
minItems: 1 · maxItems: 20
intervalenumRequired
The interval value for this operation. Its accepted type and constraints are listed above and below.
Show allowed values
"hour""day""week""month"
entitlementIduuid | nullRequired
The entitlementId value for this operation. Its accepted type and constraints are listed above and below.
entityIduuid | nullRequired
Entity ID within the current customer scope, for configured entity and license features.
topNinteger | nullRequired
The topN value for this operation. Its accepted type and constraints are listed above and below.
groupByenum | stringRequired
The groupBy value for this operation. Its accepted type and constraints are listed above and below.
afterobject | nullRequired
The after value for this operation. Its accepted type and constraints are listed above and below.
Show child fields
bucketdate-timeRequired
The bucket value for this operation. Its accepted type and constraints are listed above and below.
groupstringRequired
The group value for this operation. Its accepted type and constraints are listed above and below.
maxLength: 240
isOtherbooleanRequired
The isOther value for this operation. Its accepted type and constraints are listed above and below.
entitlementIduuidRequired
The entitlementId value for this operation. Its accepted type and constraints are listed above and below.
limitintegerRequired
Maximum records per page, subject to the contract limit.
min: 1 · max: 100
Response fields
Successful responses include requestId and scope. Use the actual business status or accepted field to determine the result. Optional fields are omitted when unavailable.
HTTP 200 · application/json
requestIduuidRequired
Server-generated HTTP request UUID. Include it when reporting a failed request.
scopeobjectRequired
The App and environment of this response. Headers only verify scope; they cannot switch key scope.
Show child fields
projectIdstringRequired
App ID bound to the credential.
minLength: 1
environmentenumRequired
Separate data scope: sandbox or live.
Show allowed values
"sandbox""live"
analyticsobjectRequired
The analytics value for this operation. Its accepted type and constraints are listed above and below.
Show child fields
fromdate-timeRequired
The from value for this operation. Its accepted type and constraints are listed above and below.
todate-timeRequired
The to value for this operation. Its accepted type and constraints are listed above and below.
intervalenumRequired
The interval value for this operation. Its accepted type and constraints are listed above and below.
Show allowed values
"hour""day""week""month"
timezonestringRequired
The timezone value for this operation. Its accepted type and constraints are listed above and below.
maxLength: 100
rowsarrayRequired
The rows value for this operation. Its accepted type and constraints are listed above and below.
maxItems: 100
Show child fields
bucketdate-timeRequired
The bucket value for this operation. Its accepted type and constraints are listed above and below.
groupstringRequired
The group value for this operation. Its accepted type and constraints are listed above and below.
maxLength: 240
isOtherbooleanRequired
The isOther value for this operation. Its accepted type and constraints are listed above and below.
entitlementIduuidRequired
The entitlementId value for this operation. Its accepted type and constraints are listed above and below.
eventCountstringRequired
The eventCount value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
unitsstringRequired
The units value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})(\.\d{1,18})?$
tokenEventCountstringRequired
The tokenEventCount value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
tokensobjectRequired
The tokens value for this operation. Its accepted type and constraints are listed above and below.
Show child fields
inputstringRequired
The input value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
outputstringRequired
The output value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
cache_readstringRequired
The cache_read value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
cache_writestringRequired
The cache_write value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
reasoningstringRequired
The reasoning value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
input_audiostringRequired
The input_audio value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
output_audiostringRequired
The output_audio value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
totalTokensstringRequired
The totalTokens value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
providerCostEventCountstringRequired
The providerCostEventCount value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
providerCostUsdstringRequired
The providerCostUsd value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})(\.\d{1,18})?$
invalidTelemetryEventCountstringRequired
The invalidTelemetryEventCount value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,29})$
nextCursorobject | nullRequired
Next-page cursor; null means end. Pass unchanged and clear when filters change.
Show child fields
bucketdate-timeRequired
The bucket value for this operation. Its accepted type and constraints are listed above and below.
groupstringRequired
The group value for this operation. Its accepted type and constraints are listed above and below.
maxLength: 240
isOtherbooleanRequired
The isOther value for this operation. Its accepted type and constraints are listed above and below.
entitlementIduuidRequired
The entitlementId value for this operation. Its accepted type and constraints are listed above and below.
Handle errors
Common failures
Code
Recovery
UNAUTHENTICATED
Verify the key or refresh the expired customer token once.
FORBIDDEN
Check current key permissions and customer access.
INVALID_REQUEST
Check field types, UUIDs, decimal strings and mutually exclusive fields.
SCOPE_MISMATCH
Use the App and environment bound to the credential.
Common failures
UNAUTHENTICATED
Recovery
Verify the key or refresh the expired customer token once.
FORBIDDEN
Recovery
Check current key permissions and customer access.
INVALID_REQUEST
Recovery
Check field types, UUIDs, decimal strings and mutually exclusive fields.
SCOPE_MISMATCH
Recovery
Use the App and environment bound to the credential.