Skip to main content
POST
Calls Usage

Corps

application/json

Request to compute aggregated usage for multiple root calls.

This endpoint returns usage metrics for each requested root call, where each root's metrics include the sum of its own usage plus all descendants' usage.

Note: All matching calls are loaded into memory for aggregation. For very large result sets (>10k calls), consider batching root call IDs or using narrower filters at the application layer.

project_id
string
requis
call_ids
string[]
requis

Root call IDs to aggregate. Each result key corresponds to one input call ID.

include_costs
boolean
défaut:false

If true, include cost calculations in the usage.

limit
integer
défaut:10000

Maximum number of calls to process across all traces. Acts as a safety limit to prevent unbounded memory usage.

Réponse

Successful Response

Response with aggregated usage metrics per root call.

call_usage
Call Usage · object
unfinished_call_ids
string[]
Dernière modification le 30 septembre 2026