---
title: AI Gateway — One API for Every Model
canonical: https://telnyx.com/products/ai-gateway
---
# AI Gateway — One API for Every Model

**Edge Compute**

# AI Gateway

Give every team its own models, budgets and guardrails, without handing out your account key. The gateway is free. You pay only for the inference you use.

[Start building](https://telnyx.com/sign-up)[Read the docs](https://developers.telnyx.com/docs/inference/ai-gateway/quickstart)

**Why Telnyx**

## One account key is not an access policy

Most teams start AI work by sharing a single provider key. It works until someone needs to know who spent what, a key leaks into a repo, or a customer pastes a card number into a prompt. AI Gateway puts a policy between every caller and every model.

* ### Scoped keys, no sharing  
Your account key never leaves the portal. Each team, service, or person gets its own key with its own models, limits and expiry. Revoke one without rotating the rest.
* ### Spend you track  
Cap spend per gateway, per person, per key or per end user, over a day, a week or a month. The gateway reserves the cost before a request runs, so a cap is a cap.
* ### Every model behind one URL  
Open models on Telnyx GPUs with zero data retention, and your own OpenAI and Anthropic keys, under the same controls. Your code changes its base URL and nothing else.

How control works

## Four scopes. Any one of them can say no.

Every request is checked against its key, the person who owns it, the gateway it belongs to and the end user it is for, all at once. If any scope is out of budget, over its rate or blocked, the request stops before it reaches a model.

* Gateway  
Allowed models, guardrails and a team budget. Every key issued into it inherits the policy. API name: token group
* Person  
One budget and rate limit across every key a person holds. API name: token user
* Key  
Can narrow models, add limits and expire. Keys are always capped: a gateway or person can be uncapped, a key cannot. API name: token key
* End user  
Your customer, named by the user field on each request. Cap or block one customer without touching anyone else. API name: end user

How it works

## Change the base URL. Keep your SDK.

Create a gateway, add a policy, issue a scoped key and call any model through the OpenAI SDK. Anthropic models also accept the Anthropic Messages API.

[Read the docs](https://developers.telnyx.com/docs/inference/ai-gateway/quickstart)

Create

```
```bash
curl -X POST "$AI_GATEWAY_MANAGEMENT_BASE_URL/token_groups" \
 -H "Authorization: Bearer $TELNYX_API_KEY" \
 -H "Content-Type: application/json" \
 -H "Idempotency-Key: $(uuidgen)" \
 -d "$(jq -n --arg model "$AI_GATEWAY_MODEL" '{
 name: "support-assistant",
 allowed_models: [$model],
 max_budget: 10,
 budget_duration: "1d",
 rpm_limit: 60
 }')"
```

Features

## Everything between your code and the model

Set it up in Mission Control under Inference, or drive every part of it from the management API.

* Model allowlists  
Choose which models each gateway can call, from Telnyx hosted open models to your own OpenAI and Anthropic keys. A key can narrow that list further.
* Budgets  
Dollar caps per gateway, person, key or end user over a rolling 1, 7 or 30 day window, counted from when you set them. Cost is reserved before dispatch, so nothing overruns.
* Rate limits  
Requests and tokens per minute on rolling 60 second windows. Callers over the limit get a 429 with a Retry After header.
* Guardrails  
Ignore, flag or block secrets, card numbers, IBANs, SSNs, emails and phone numbers, separately for prompts and responses, with one policy per gateway.
* Bring your own key  
Store an OpenAI or Anthropic key once and attach it to any gateway. Billed by your provider, with every gateway control still applied.
* Usage analytics  
Tokens, cost and status for every request, summarised by gateway, person, key or end user, in Mission Control or through the spend API.

**Pricing**

## The gateway is free. You pay for tokens.

No platform fee, no per seat charge, and no markup on your own provider keys. Telnyx hosted models bill at standard inference rates. Your OpenAI and Anthropic keys are billed by the provider.

$0

to run a gateway

[See pricing](https://telnyx.com/pricing/inference-api)

Products

## Building AI that reaches beyond the chat?

AI Gateway governs model calls. The rest of the platform runs the code, holds the state and places the call, on the same network.

[See all products](https://telnyx.com/products)

* ### Inference  
Open models on GPUs Telnyx owns. OpenAI compatible, in region, zero data retention.  
[Learn more](https://telnyx.com/products/inference)
* ### AgentSDK  
Durable state and platform bindings for agents, with your framework unchanged.  
[Learn more](https://telnyx.com/products/agentsdk)
* ### Functions  
Deploy containerised code to the edge with one command, next to the models.  
[Learn more](https://telnyx.com/products/functions)
* ### Mission Control  
The portal where you create gateways, issue keys and watch spend, beside every other Telnyx product.  
[Learn more](https://telnyx.com/mission-control)

## Sign up and start building.

Create a gateway in Mission Control, issue your first scoped key and make your first request.

[Sign up](https://telnyx.com/sign-up)[Talk to us](https://telnyx.com/contact-us)

## Sign up and start building.

Create a gateway in Mission Control, issue your first scoped key and make your first request.

[Sign up](https://telnyx.com/sign-up)[Talk to us](https://telnyx.com/contact-us)

## FAQ

### What is Telnyx AI Gateway?

A control layer for model access. It issues scoped inference keys so applications and people can call AI models without your account API key, and it enforces model allowlists, budgets, rate limits and guardrails on every request, with a usage ledger behind it.

### How much does it cost?

### Which models can I use?

### Do I need to change my code?

### How does bring your own key work?

### What do guardrails detect?

### How are budgets counted?

### What is not supported yet?

[Start building](https://telnyx.com/sign-up)