Telnyx AI Gateway API

Manage and report AI Gateway traffic.

GitHub OpenAPI

Operations 14

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /llm_token_gateway/spend/events List per-request token spend · List gateway spend events #
Ask an LLM
“How much did my AI gateway token requests cost per request?”
“Can I see token spend for a single token group or user?”
Tell an agent
List per-request spend events for token group {token_group_id}.
Show gateway token spend for user {token_user_id} between {start_date} and {end_date}.
GET /llm_token_gateway/spend/summary Summarize gateway token spend · Get gateway spend summary #
Ask an LLM
“What is my total token spend grouped by day?”
“Can I break down gateway token spend by user or model?”
Tell an agent
Summarize gateway token spend from {start_date} to {end_date} grouped by {group_by}.
Show daily token spend for token group {token_group_id} between {start_date} and {end_date}.
GET /llm_token_gateway/token_groups List AI gateway token groups · List gateway token groups #
Ask an LLM
“Which token groups exist for my AI gateway?”
“Can I see the budget and rate limits on each token group?”
Tell an agent
List all gateway token groups.
Show every AI gateway token group with its allowed models and budget.
POST /llm_token_gateway/token_groups Create an AI gateway token group · Create gateway token group #
Ask an LLM
“How do I cap token spend per user or group?”
“Can I set a time-based budget and a maximum number of models allowed?”
Tell an agent
Create a token group {name} allowing models {allowed_models}.
Create token group {name} with a {max_budget} budget and {budget_duration} budget duration.
DELETE /llm_token_gateway/token_groups/{id} Revoke an AI gateway token group · Delete gateway token group #
Ask an LLM
“How do I revoke a token group and its keys at once?”
“Does revoking a token group detach its keys into an ungoverned service key?”
Tell an agent destructive · confirm first
Revoke token group {id}.
Delete gateway token group {id} and its keys atomically.
GET /llm_token_gateway/token_groups/{id} Get an AI gateway token group · Get gateway token group #
Ask an LLM
“What models and rate limits does a token group allow?”
“Can I check a token group's budget and concurrency limits?”
Tell an agent
Show gateway token group {id}.
Get the allowed models and rate limits of token group {id}.
PATCH /llm_token_gateway/token_groups/{id} Update an AI gateway token group · Update gateway token group #
Ask an LLM
“Can I change the models allowed in a token group?”
“How do I raise the rate limit on an existing token group?”
Tell an agent
Set allowed models on token group {id} to {allowed_models}.
Change the rate limit of token group {id} to {rpm_limit} requests per minute.
GET /llm_token_gateway/token_keys List AI gateway token keys · List gateway token keys #
Ask an LLM
“Which token keys exist for my AI gateway?”
“Can I see the spend limits on each token key?”
Tell an agent
List gateway token keys for token group {token_group_id}.
Show all AI gateway token keys.
POST /llm_token_gateway/token_keys Create an AI gateway token key · Create gateway token key #
Ask an LLM
“How do I generate a new token key for a user?”
“Can I cap a token key's spend and rate limits?”
Tell an agent
Create a token key {name} in group {token_group_id}.
Create token key {name} for user {token_user_id} with a {max_budget} budget.
DELETE /llm_token_gateway/token_keys/{id} Revoke an AI gateway token key · Delete gateway token key #
Ask an LLM
“How do I revoke a token key so new requests are blocked?”
“Do requests already admitted with a revoked key complete?”
Tell an agent destructive · confirm first
Revoke token key {id}.
Delete gateway token key {id} so it can no longer admit requests.
GET /llm_token_gateway/token_keys/{id} Get an AI gateway token key · Get gateway token key #
Ask an LLM
“What models and rate limits does a token key allow?”
“When does a token key expire?”
Tell an agent
Show gateway token key {id}.
Get the allowed models and rate limits of token key {id}.
PATCH /llm_token_gateway/token_keys/{id} Update an AI gateway token key · Update gateway token key #
Ask an LLM
“Can I change the models a token key allows?”
“How do I raise the rate limit on an existing token key?”
Tell an agent
Set allowed models on token key {id} to {allowed_models}.
Change the rate limit of token key {id} to {rpm_limit} requests per minute.
GET /llm_token_gateway/usage/export Export gateway usage records · Export gateway usage #
Ask an LLM
“Can I export every token request and guardrail event for my own pipeline?”
“What record types does the gateway usage export include?”
Tell an agent
Export gateway usage records of type {types}.
Export gateway usage records starting at {start_time}.
GET /llm_token_gateway/usage/summary Summarize gateway usage · Get gateway usage summary #
Ask an LLM
“How many requests and tokens did my gateway group use?”
“Can I see guardrail events for a token group?”
Tell an agent
Summarize gateway usage for group {token_group_id} from {start_date} to {end_date}.
Show daily token usage for group {token_group_id} between {start_date} and {end_date}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/telnyx:telnyx-ai-gateway-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

telnyx-ai-gateway-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.0.0
  x-latency-category: responsive
  x-endpoint-cost: light
  title: Telnyx AI Gateway API
  description: SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
  contact:
    email: support@telnyx.com
servers:
- url: https://api.telnyx.com/v2
  description: Version 2.0.0 of the Telnyx API
security:
- bearerAuth: []
tags:


# --- truncated at 32 KB (136 KB total) ---
# Full source: https://artifacts.apis.io/telnyx/openapi/telnyx-ai-gateway-api-openapi.yml