optionality_get_api_usage_stats
Aggregated LLM usage and cost for this patron's calls.
Returns {"models": [{"model", "runs", "total_calls", "total_input_tokens", "total_output_tokens", "total_cost_usd", "priced_runs"}, ...], "totals": {...}}.
One row per distinct model the patron's tool calls have invoked.
total_cost_usd is what the PROVIDER reported for those calls, not a figure
reconstructed from a price table — tokens from two models are not comparable
money, so a local table goes wrong the moment the route changes model.
priced_runs says how many of runs carried a reported cost, so a caller
can render "$0.42 across 3 of 5 runs" rather than implying the rest were free.
totals.avg_cost_usd is what one call actually costs to serve — the number
that says whether a tool's sats price covers its own compute.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| npub | No | Required. Your Nostr public key (npub1...) for credit billing. | |
| dpop_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||