Export gateway usage
Changed onDurable, replayable, content-free usage export for customer pipelines. Requires the dedicated llm_token_gateway.usage_export.read V2 action; spend.read and usage.read do not grant it. Records are inference.request (one per immutable ledger revision; a correction adds a new id with supersedes, keep the highest revision per request_id) and guardrail.evaluation (one per guardrail event, including blocked prompts with no inference record; correlate on request_id). Delivery is at least once in commit order: deduplicate on id. Records appear after settlement and after every older database transaction has finished (meta.horizon_lag_seconds); keep polling with next_cursor, which is always returned and is reusable after has_more is false. After a logical database restore, restart from start_time and deduplicate on id; a cursor from before it may return 409 cursor_expired (no Retry-After). Retention promise 30 days. No prompts, responses, provider credentials, supplier or customer rates. Gateway reference/enforcement usage, not invoice truth or BYOK provider charges.
Request
- Base URL: https://api.telnyx.com/v2
- URL: https://api.telnyx.com/v2/llm_token_gateway/usage/export
- Auth: HTTP bearer
Query parameters
Opaque next_cursor from a previous page; not combinable with start_time. Bound to the requested types; the account always comes from the credential.
First page only: RFC 3339 with offset, at most 30 days ago and not in the future; default now - 24h.
Comma-separated subset of inference.request,guardrail.evaluation; default both.
Response
OK
Changes
- info
endpoint added
- info