Get gateway spend summary
Changed onReturn request counts, token counts and reference spend grouped by one attribution dimension. Both UTC dates and group_by are required. Dates use a half-open range [start_date, end_date) of at most 31 days. Cost reflects budget reference rates, not invoice charges. Unknown spend is excluded and reported separately. The report snapshot supports at most 10,000 matching requests, independently of page size. Exceeding this bound returns HTTP 503 without partial results. Narrow the date range or resource filters before retrying. A failed report must not be interpreted as zero usage. Request tags can filter either report and metadata:<key> can group the summary.
Request
- Base URL: https://api.telnyx.com/v2
- URL: https://api.telnyx.com/v2/llm_token_gateway/spend/summary
- Auth: HTTP bearer
Query parameters
Required after page 1; account/filter-bound 15-minute stable snapshot; expired/mismatch 409.
Request tag filters as metadata[<key>]=<value>, at most 5, combined with AND. A value matches the tag's text form exactly (booleans as true/false, integers in decimal), so metadata[flag]=true matches both boolean true and the string "true". Keys are case-sensitive; reserved-prefix keys are rejected. Unindexed: bounded by the account, the date range and the report timeout.
A scope, or metadata:<key> to group by one request tag's text-form value; requests without the key form one group with a null dimension_id.
Response
OK
Changes
- info
endpoint added
- info