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

# Endpoints

> Name what your app asks a model to do, and change the model behind it without touching code

## What is an endpoint?

An endpoint is a named model setup that your app calls. You name it for what it does (`support-summarizer`, `classify-email`), and your code sends that name where it used to send a model. The endpoint holds everything else:

* which model answers
* which models take over if that one fails
* the parameter defaults (system prompt, temperature, max tokens)
* its spending limit

Change any of these on the endpoint and every call to it follows, with no deploy.

> [!NOTE]
>
> The management API keeps its original path: endpoints live at `/v1/gates`.

## Calling an endpoint

Point the SDK you already use at Verlon, and put the endpoint's name in the model field:

> [tab] OpenAI SDK
>
> ```typescript theme={null}
> import OpenAI from 'openai';
>
> const openai = new OpenAI({
>   baseURL: 'https://api.verlon.ai/v1',
>   apiKey: process.env.VERLON_API_KEY,
> });
>
> const response = await openai.chat.completions.create({
>   model: 'support-summarizer',
>   messages: [{ role: 'user', content: 'How do I reset my password?' }],
> });
> ```

> [tab] Anthropic SDK
>
> ```typescript theme={null}
> import Anthropic from '@anthropic-ai/sdk';
>
> const anthropic = new Anthropic({
>   baseURL: 'https://api.verlon.ai',
>   apiKey: process.env.VERLON_API_KEY,
> });
>
> const response = await anthropic.messages.create({
>   model: 'support-summarizer',
>   max_tokens: 1024,
>   messages: [{ role: 'user', content: 'How do I reset my password?' }],
> });
> ```

> [tab] cURL
>
> ```bash theme={null}
> curl https://api.verlon.ai/v1/chat/completions \
>   -H "Authorization: Bearer $VERLON_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "model": "support-summarizer",
>     "messages": [{ "role": "user", "content": "How do I reset my password?" }]
>   }'
> ```

The response carries an `x-verlon-served-model` header naming the model that answered. A name that matches none of your endpoints is refused with `404` and the code `no_endpoint_named`; the message lists your endpoints and points to the closest match.

To move an existing app over one call at a time, give your coding agent [verlon.ai/setup](https://verlon.ai/setup).

## Jobs

A job is one named use of an endpoint, called as `endpoint/job`:

```typescript theme={null}
model: 'support-bot/triage'
```

A job inherits the endpoint's model settings and can override any of them. Calling a job the endpoint doesn't have fails with `404` and the code `no_job_named`, listing the endpoint's jobs. Create jobs on the endpoint's page in the dashboard, or with `POST /v1/gates/{id}/jobs`.

## Types

Every endpoint has a type, fixed when it's created, which decides which models it can use:

| Type | What it does |
| - | - |
| `chat` | Text generation and conversation, with tools and structured output |
| `embeddings` | Text embeddings |
| `image` | Image generation and editing |
| `video` | Video generation |
| `tts` | Text to speech |
| `stt` | Speech to text |
| `moderation` | Content moderation |
| `ocr` | Document reading |

## Creating an endpoint

### From the dashboard

Go to **Endpoints** and create one: give it a name, say what it does, and pick its model. Fallbacks, the system prompt and the other defaults are optional and can be set any time on the endpoint's page.

### From the CLI

```bash theme={null}
verlon endpoint create --name support-summarizer --model gpt-5.4-mini \
  --description "Summarizes support tickets"
```

The type defaults to the model's own. Running the same command again returns the endpoint it made, so a script or a coding agent can re-run its steps safely.

### From the API

```bash theme={null}
curl https://api.verlon.ai/v1/gates \
  -H "Authorization: Bearer $VERLON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "support-summarizer",
    "model": "gpt-5.4-mini",
    "taskType": "chat",
    "description": "Summarizes support tickets",
    "fallbackModels": ["claude-sonnet-4-6"],
    "routingStrategy": "fallback",
    "systemPrompt": "You summarize support tickets in three lines."
  }'
```

To get a free name from a sentence, call `POST /v1/gates/suggest-name` with `{ "sentence": "Summarizes support tickets" }`.

### Names

A name is lowercase letters, digits and single hyphens, starting with a letter, up to 64 characters. It can't be a model's or a provider's name (your code would look like it calls the model), look like an id, or be one of the dashboard's own page words. Names are unique in your organization. A refused name comes back with a suggestion in `details.suggestion`; a taken one is a `409`.

## Fallbacks

An endpoint can list fallback models and a strategy for using them:

* **Single** (default): only the endpoint's model.
* **Fallback**: the endpoint's model first; if it fails (an outage, a rate limit), each fallback in order until one answers.

  ```
  Model: claude-sonnet-4-6 → fails
  Fallback 1: gpt-5.4-mini → fails
  Fallback 2: gemini-2.5-flash → answers
  ```
* **Round-robin**: spreads requests across the model and its fallbacks.

## Model choice

* **Pick a model** (the default): the endpoint serves the model you picked, and Verlon may suggest changes for you to accept.
* **Lock to a model**: the endpoint serves exactly that model. No automatic changes, and fallbacks only if you list them.

## Configuration reference

Fields marked **required** must be set when an endpoint is created.

### Core fields

| Field | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The endpoint's name, sent as `model` by your code. See [Names](#names). |
| `model` | `string` | Yes | The model that answers, as the [registry](https://docs.verlon.ai/provider-compatibility/models.md) lists it (e.g. `gpt-5.4-mini`). |
| `taskType` | `string` | No | The endpoint's type (see [Types](#types)): set it to the model's type. Fixed once created. |
| `description` | `string` | No | What the endpoint does, in a sentence. Verlon reads it when suggesting models. |
| `modelChoice` | `'pick' \| 'lock'` | No | See [Model choice](#model-choice). Defaults to `pick`. |
| `tags` | `string[]` | No | Labels for filtering and grouping. |

### Fallbacks

| Field | Type | Default | Description |
| - | - | - | - |
| `routingStrategy` | `'single' \| 'fallback' \| 'round-robin'` | `'single'` | How requests use the model and its fallbacks. |
| `fallbackModels` | `string[]` | `[]` | Ordered fallback models. |

### Request defaults

Applied to every request through the endpoint. A request that sets one of these uses its own value; the model always comes from the endpoint.

| Field | Type | Description |
| - | - | - |
| `systemPrompt` | `string` | System prompt sent with every request. May hold `{{name}}` placeholders filled from the request's `vars`. |
| `temperature` | `number` | Randomness (0 to 2). |
| `maxTokens` | `number` | Longest answer, in tokens. |
| `topP` | `number` | Nucleus sampling threshold (0 to 1). |

### Model suggestions

Verlon reads the endpoint's description and traffic to suggest models. These weigh what it optimizes for.

| Field | Type | Default | Description |
| - | - | - | - |
| `costWeight` | `number` | — | Weight for cost (0 to 1). |
| `latencyWeight` | `number` | — | Weight for latency (0 to 1). |
| `qualityWeight` | `number` | — | Weight for quality (0 to 1). |
| `reanalysisPeriod` | `'daily' \| 'weekly' \| 'monthly' \| 'never'` | `'never'` | How often suggestions are refreshed. |

### Structured output

| Field | Type | Default | Description |
| - | - | - | - |
| `responseFormatEnabled` | `boolean` | `false` | Turn structured output on. |
| `responseFormatType` | `'text' \| 'json_object' \| 'json_schema'` | `'text'` | `json_object` guarantees valid JSON; `json_schema` holds to a schema. |
| `responseFormatSchema` | `object` | — | The schema for `json_schema`. |

### Spending limit

An endpoint's own cap. See [Spending](https://docs.verlon.ai/platform/spending.md) for organization and project budgets.

| Field | Type | Default | Description |
| - | - | - | - |
| `spendingLimit` | `number \| null` | `null` | Dollar cap per period; `null` for none. |
| `spendingLimitPeriod` | `'monthly' \| 'daily'` | `'monthly'` | When the counter resets. |
| `spendingEnforcement` | `'alert_only' \| 'block'` | `'alert_only'` | `alert_only` warns and serves; `block` refuses once the cap is reached. |

### Read-only fields

| Field | Type | Description |
| - | - | - |
| `id` | `string` | The endpoint's id, used in management URLs (`/v1/gates/{id}`). Code calls the endpoint by name. |
| `createdAt` | `Date` | When it was created. |
| `updatedAt` | `Date` | When it last changed. |
| `spendingCurrent` | `number` | Spend in the current period (USD). |
| `spendingStatus` | `'active' \| 'suspended'` | Whether the spending limit has stopped it. |

## Agent endpoints

An agent endpoint is the identity of one agent: its traces, sessions and jobs. Create one with `gateType: "agent"` and give each call site a job. See [Agent tracing](https://docs.verlon.ai/platform/agent-gates.md).

## Limits

How many endpoints you can create depends on your plan. See [Plans](https://docs.verlon.ai/platform/plans.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.