Search measured usage
Search delayed measured spend, not live enforcement counters or invoices. Principal filters select the scope; there is no target. With no user_id or agent_id filter, the scope is the authenticated user. A single-value EQUALS user_id filter must name the caller. A single-value EQUALS agent_id filter, with no user_id filter, must name a top-level agent the caller can currently edit, including disabled agents, and measures that agent. Any other principal filter needs an organization read, so like other-user, subagent, and principal-dimension requests it is accepted structurally but returns 403 insufficient_permissions. Unknown product and feature values remain in OTHER; absent attribution remains null. Results, totals, and cursor pages share one pinned read snapshot. Totals cover observed stored rows, not certified exports or verified absent usage. AGENT uses app-compatible best-effort recorded top-agent/root attribution and same-run AGENT/LLM_CALL events, not complete run lineage. Source freshness and earliest historical coverage are null when unsupported. Usage billed in GCU on full-consumption plans isn't reported yet and is excluded from results and totals. A month whose source rows exceed 200,000 at the day and user detail the query needs, or whose source read exceeds its size, billed-byte or 30-second limit, returns 422 unprocessable_query; use a coarser granularity, fewer dimensions, or a shorter range.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 408
- 413
- 422
- 429
- 500
- 503
Measured usage buckets and complete-query totals.
Invalid request (malformed JSON, invalid parameter values, unknown fields).
Missing or invalid authentication token.
Token valid but lacks permission for the requested operation.
Resource not found.
Backend did not respond within the timeout window.
Request body exceeds the maximum allowed size.
Syntactically valid but semantically incorrect request.
Rate limit exceeded. Includes Retry-After header.
Unexpected server-side failure.
Backend temporarily unavailable.