Skip to main content
GET
Billing consumption
Aggregated debits from your credit account, bucketed by date and product. Useful for usage dashboards, monthly reconciliation, and anomaly detection. By default, top-ups are excluded — pass include_topups=true to fold them in for full statement parity.

Common queries

Products

Token usage

Buckets for token-metered products carry input_tokens, output_tokens and total_tokens alongside the amount. Today that means eval_run — eval charges are a direct function of tokens consumed, so these fields are what explain a given line. Products that don’t meter tokens omit these fields entirely rather than returning 0, so total_tokens being absent means “not applicable here”, never “nothing was used”.
Input dominates output by a wide margin on evals — often 150:1. That’s expected: the agent’s conversation context is re-sent on every turn, so a long case accumulates input tokens quadratically while output stays roughly constant per turn. If a suite is costing more than you expect, the lever is usually case length and prompt size, not the number of runs.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys.

Query Parameters

from
string<date-time>

Start of the window. Defaults to 30 days ago.

to
string<date-time>

End of the window (exclusive). Defaults to now.

group_by
enum<string>
default:day

Bucket granularity. agent returns one row per agent_id (currently only populated for voice_call).

Available options:
day,
month,
total,
agent
product
enum<string>

Filter to a single product category.

Available options:
voice_call,
eval_run,
phone_number,
topup,
refund
include_topups
boolean
default:false

Response

Consumption rows

from
string<date-time>
to
string<date-time>
group_by
string
data
object[]