Both live under
https://api.telnyx.com/v2/llm_token_gateway, authenticate with the Telnyx account API key and use the same date range, filters and pagination.
Date range and filters
The range is half-open,
[start_date, end_date), and spans at most 31 days. Send ISO dates, not timestamps. If you omit both dates on /spend/events, it returns the previous full UTC day. To include today, set end_date to tomorrow’s date.
Spend events
Spend summary
group_by selects the dimension. Each row totals the requests attributed to one value of that dimension within the range and filters.
group_by dimensions are alternative views of the same requests. Do not add totals from different dimensions together.
Pagination
The first page returnsmeta.snapshot, a stable view bound to the account, range and filters for 15 minutes. While meta.has_more is true, request the next page[number] with the same parameters plus page[snapshot]=<meta.snapshot>. Changing filters or mixing snapshots returns 409. Treat an export as complete only once has_more is false.
Interpreting the numbers
- Unknown usage is not zero. A request whose usage never arrived, for example an interrupted stream, keeps its reservation as
reserved_spendand reportscost: nullwithusage_status: "unknown". Later reconciliation updates the same event toreconciled. - Usage is billed at standard pricing. Usage of Telnyx-hosted models is billed to your Telnyx account at standard Telnyx AI Inference pricing for each model.
- BYOK requests are reported like any other. Requests on bring-your-own-key models appear in spend events and summaries like any other request. Their
costis the budget reference valuation, not a Telnyx charge; your provider bills them. - Spend is not an invoice.
costandspendare measured at a flat reference rate (USD 5 per million input tokens, USD 15 per million output tokens) for enforcing budgets and attribution. They are not your invoice. - Revoked and deleted resources keep their history. Filters by ID continue to work after a key, user or group is deleted.