> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Models

> Telnyx-hosted models behind one OpenAI-compatible endpoint on every instance.

An instance serves an OpenAI-compatible API at its `gateway_url`, and the Anthropic Messages API beside it. An OpenAI or Anthropic client works against it unchanged:

| Path | What It Does |
| - | - |
| `GET {gateway_url}/v1/models` | Lists the models the instance serves. |
| `POST {gateway_url}/v1/chat/completions` | Chat completions, with streaming and tool use. |
| `POST {gateway_url}/v1/responses` | Responses, in the OpenAI Responses API format. |
| `POST {gateway_url}/v1/messages` | Messages, in the Anthropic Messages API format. |

> [!WARNING]
>
> **Beta.** Every instance serves the models below, and models from other providers cannot be added.

## Set Up

An instance serves models from [Telnyx Inference](https://developers.telnyx.com/docs/inference/models.md) as soon as it is `ready`, with nothing to add, and [`GET /v2/agent_gateways/{id}/models`](https://developers.telnyx.com/api-reference/agent-gateways/list-an-agent-gateways-models) lists them. Requests name a model by the instance's name for it, which differs from its Telnyx Inference model ID:

| Model | Telnyx Inference Model | Reasoning |
| - | - | - |
| `GLM-5.3` | `zai-org/GLM-5.3` | Yes |
| `GLM-5.3-Flash` | `zai-org/GLM-5.3-Flash` | Yes |
| `DeepSeek-V4.1-Flash` | `deepseek-ai/DeepSeek-V4.1-Flash` | No |
| `Qwen3.8-27B` | `Qwen/Qwen3.8-27B` | Yes, at low effort |
| `Qwen3.8-27B-nothink` | `Qwen/Qwen3.8-27B` | No |

A model has no settings of its own. Each key and team has:

* An [allow list](https://developers.telnyx.com/docs/agent-gateway/authorization/allow-lists.md) of the models it may use.
* A [budget and rate limits](https://developers.telnyx.com/docs/agent-gateway/traffic/budgets-and-rate-limits.md) for its requests.

A request sets its own [retries, timeout, and fallbacks](https://developers.telnyx.com/docs/agent-gateway/traffic/routing-and-fallbacks.md).

## Use

A request comes from a host on the instance's [*Network*](https://developers.telnyx.com/docs/network/overview.md), goes to `gateway_url`, and carries a [key](https://developers.telnyx.com/docs/agent-gateway/authentication/keys.md) as a bearer token. The commands below read both from the host's environment, as `GATEWAY_URL` and `AGW_KEY`.

### List the Models

```bash Host theme={null}
curl "$GATEWAY_URL/v1/models" \
  -H "Authorization: Bearer $AGW_KEY"
```

```json Output theme={null}
{
  "data": [
    { "id": "GLM-5.3", "object": "model", "created": 1677610602, "owned_by": "openai" },
    { "id": "GLM-5.3-Flash", "object": "model", "created": 1677610602, "owned_by": "openai" },
    { "id": "DeepSeek-V4.1-Flash", "object": "model", "created": 1677610602, "owned_by": "openai" },
    { "id": "Qwen3.8-27B", "object": "model", "created": 1677610602, "owned_by": "openai" },
    { "id": "Qwen3.8-27B-nothink", "object": "model", "created": 1677610602, "owned_by": "openai" }
  ],
  "object": "list"
}
```

### Send a Chat Completion

`POST {gateway_url}/v1/chat/completions` takes an OpenAI chat completion request:

```bash Host theme={null}
curl "$GATEWAY_URL/v1/chat/completions" \
  -H "Authorization: Bearer $AGW_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "GLM-5.3-Flash",
    "messages": [
      { "role": "user", "content": "In one sentence, what does a gateway do?" }
    ]
  }'
```

The instance answers in the OpenAI chat completion format:

```json Output theme={null}
{
  "id": "chatcmpl-4ccb13b2-d225-4764-900e-76b44502de2e",
  "model": "GLM-5.3-Flash",
  "object": "chat.completion",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "A gateway is a network device or node that connects two networks using different protocols, translating and routing data between them so they can communicate—essentially serving as an entry and exit point between networks.",
        "reasoning_content": "The user is asking a simple question about what a gateway does, and they want ...",
        ...
      }
    }
  ],
  "usage": {
    "completion_tokens": 278,
    "prompt_tokens": 22,
    "total_tokens": 300,
    "completion_tokens_details": { "reasoning_tokens": 240 },
    ...
  },
  ...
}
```

The models behave as they do on Telnyx Inference, including [reasoning](https://developers.telnyx.com/docs/inference/getting-started.md), [streaming](https://developers.telnyx.com/docs/inference/getting-started.md#streaming), and [function calling](https://developers.telnyx.com/docs/inference/functions.md).
