List the credit-denominated billing ledger with source filtering and opaque cursor pagination. period defaults to 30d, so an unqualified request covers only the last 30 days: paginating to nextCursor: null exhausts that window, not the whole ledger. An inverted custom window is a 400 rather than an empty page.
/api/v2/billing/logsAuthorization
apiKey Your Sim API key, personal or workspace-scoped. Generate one under Settings, then API Keys. Operations that reject workspace keys say so in their own description.
In: header
Query Parameters
Restrict results to one usage source.
"workflow" | "wand" | "sim-chat" | "mcp_copilot" | "mothership_block" | "knowledge-base" | "voice-input" | "enrichment" | "voice-output"Restrict results to one workspace whose payer the caller can inspect.
1 <= length <= 128Relative window, all history, or a custom date range. startDate and endDate are accepted only with custom; every other value computes its own window.
"30d""1d" | "7d" | "30d" | "all" | "custom"Only include usage events recorded at or after this UTC ISO 8601 timestamp, e.g. 2026-08-06T00:00:00Z. Requires period=custom. A date without a time, or a timestamp carrying a UTC offset instead of Z, is rejected, as is year 0000, which names no storable instant.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$date-timeOnly include usage events recorded at or before this UTC ISO 8601 timestamp, e.g. 2026-08-06T00:00:00Z. Requires period=custom, and defaults to now when omitted. A date without a time, or a timestamp carrying a UTC offset instead of Z, is rejected, as is year 0000, which names no storable instant.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$date-timeMaximum usage events per page. Must be a whole number from 1 to 100. Defaults to 50.
501 <= value <= 100Opaque cursor from the previous page. Send it back with the same sort and filters; only limit may change. Change anything else and pagination must restart without a cursor.
1 <= lengthResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://www.sim.ai/api/v2/billing/logs" \ -H "X-API-Key: YOUR_API_KEY"{
"data": [
{
"id": "log_1",
"createdAt": "2026-07-29T18:04:11.000Z",
"source": "sim-chat",
"workspaceId": "ws_1",
"workflow": null,
"runId": null,
"creditCost": 12
}
],
"nextCursor": null
}{
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "API key required"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Insufficient workspace permissions",
"details": {
"code": "INSUFFICIENT_WORKSPACE_ROLE"
}
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "API rate limit exceeded",
"details": {
"retryAfter": "2026-01-01T00:00:30.000Z"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable"
}
}