Get Ledger Breakdown
Changed onReturn the active team's usage spend, grouped as requested.
Reads billing_ledger alone, so grouping never joins to requests and agent spend can carry no prompt content (ENG-4722). Usage entries only: top-ups, grants and adjustments are wallet movements rather than work, and are what /balance accounts for.
Args: start: Inclusive lower bound on entry time. end: Exclusive upper bound on entry time. auth: Authenticated caller; the active billing team is read from scope. dimension: Grouping dimensions; at least one, or supply a grain. grain: Optional UTC day/month bucketing. project_id: Optional project filter. experiment_id: Optional experiment filter.
Returns: One row per group, largest spend first.
Raises: HTTPException: 422 when the window is invalid or no grouping is given.
Request
- Base URLhttps://api.pioneer.ai (the document declares no server; this is the origin it was published from)
- Auth
- API key in header X-API-Key
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Inclusive lower bound on entry time (ISO, tz-aware)
Exclusive upper bound on entry time (ISO, tz-aware)
Repeatable: category, model, provider, project, experiment
Bucket by UTC day or month
Restrict to one project
Restrict to one experiment
Response
Successful Response
Changes
- info
endpoint added
- info