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

# Models

> The model catalogue an agent can run on — read live from the inference network, never a fixed list.

<Info>There is **no fixed list of models**. The catalogue is read from the inference network and cached briefly, so a model published this morning is runnable this morning. Search it here; pass what you find as `model` on an [agent](/docs/api/agents) or a [session](/docs/api/sessions), or as `model` to the [model proxy](/docs/api/proxy).</Info>

## The model object

<ResponseField name="object" type="string">Always `model`.</ResponseField>
<ResponseField name="id" type="string">The model's id. This is what `model` takes on an agent, a session and the proxy.</ResponseField>
<ResponseField name="context_window" type="integer">Maximum context length in tokens, as the provider that will serve it publishes it.</ResponseField>
<ResponseField name="max_output_tokens" type="integer">The longest reply this model may produce. It is also the output half of the [pre-flight quote](/docs/concepts/budgets), so a model with a large allowance reserves more against your balance for the same prompt.</ResponseField>
<ResponseField name="supported_windows" type="string[]">Which [completion windows](/docs/concepts/completion-window) this model can run in. `immediate` is always present; `priority` and `loose` appear only for pool-hosted models.</ResponseField>
<ResponseField name="efforts" type="string[]">Effort levels the model accepts, from what it publishes. Empty when it accepts none.</ResponseField>

**No price is published here**, the same line [`GET /v1/media/models`](/docs/api/media) draws. What a call costs depends on the window it runs in and on which of the five token tiers its usage lands in; a single figure on this reply would be a guess. See [the model router](/docs/concepts/model-router#what-a-model-call-costs) for how a call is metered, and [Pricing](/docs/platform/pricing).

## List the catalogue

`GET /v1/models` — any valid key; no scope.

<ParamField query="window" type="string">`immediate`, `priority` or `loose`. Narrows the list to models that window can actually serve — the same derivation the router refuses on, so a model listed for a window is never refused for it.</ParamField>
<ParamField query="search" type="string">Free text, matched against a model's id and name. Omit it to list them all.</ParamField>
<ParamField query="limit" type="number">Page size, 1–100. Defaults to 20.</ParamField>
<ParamField query="after" type="string">The `next_cursor` of the previous page. Opaque — it is not a row id.</ParamField>

The catalogue runs to several hundred entries, so **this reply is paged** ([Pagination](/docs/api/pagination)). Nothing should assume one call returns the whole catalogue.

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -fsSL "https://api.vetta.sh/v1/models?search=glm&limit=2" \
    -H "authorization: Bearer sk_live_..."
  ```

  ```typescript TypeScript theme={"system"}
  const page = await vetta.models.list({ search: "glm", limit: 2 });
  ```

  ```bash CLI theme={"system"}
  vetta models list --search glm --limit 2
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={"system"}
  {
    "object": "list",
    "data": [
      {
        "object": "model",
        "id": "zai-org/GLM-5.2-FP8",
        "context_window": 1048576,
        "max_output_tokens": 32768,
        "supported_windows": ["immediate", "priority", "loose"],
        "efforts": ["high"]
      }
    ],
    "has_more": true,
    "next_cursor": "2"
  }
  ```
</ResponseExample>

Ordering is cheapest published input rate first, then by id, so a page boundary is stable within one read.

## Retrieve one model

`GET /v1/models/{id}` — any valid key; no scope.

<Warning>A model id contains a `/`, so it must be **percent-encoded** in the path: `anthropic/claude-sonnet-5` becomes `anthropic%2Fclaude-sonnet-5`.</Warning>

Use this when you already hold an id — the model an agent is set to, say — and want to know what it can do before you spend on it. It answers on the ids this route *lists*; a model the catalogue republishes under a different spelling is resolved for billing but is not itself an id you can retrieve.

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -fsSL "https://api.vetta.sh/v1/models/anthropic%2Fclaude-sonnet-5" \
    -H "authorization: Bearer sk_live_..."
  ```

  ```typescript TypeScript theme={"system"}
  const model = await vetta.models.retrieve("anthropic/claude-sonnet-5");
  console.log(model.supported_windows); // ["immediate"]
  ```

  ```bash CLI theme={"system"}
  vetta models get anthropic/claude-sonnet-5
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={"system"}
  {
    "object": "model",
    "id": "anthropic/claude-sonnet-5",
    "context_window": 1000000,
    "max_output_tokens": 32768,
    "supported_windows": ["immediate"],
    "efforts": ["low", "medium", "high"]
  }
  ```
</ResponseExample>

## Vetta Auto

`vetta/auto` is in the catalogue like any other id, and it picks the model per request. It serves `immediate` only. Because it publishes no rate card of its own, it is quoted against a price ceiling that is enforced upstream — a call that no model can serve within your budget is refused before it runs, never served at a higher price. See [the model router](/docs/concepts/model-router#vetta-auto).

## Errors

| Status  | Code                     | When                                                                                                                                   |
| ------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| **400** | `validation_failed`      | `window` is not one of `immediate\|priority\|loose`.                                                                                   |
| **404** | `not_found`              | No model with that id — including an id this deploy cannot serve.                                                                      |
| **501** | `feature_not_configured` | This deploy has no inference network configured. An empty list would say "the network publishes no models", which is a different fact. |

A transient failure to reach the network answers **500** rather than a stale or empty catalogue. The failed read is not cached, so an immediate retry is the right response to one.

<Card title="Next: the model router" icon="route" href="/docs/concepts/model-router">
  How a call is routed, what the completion window changes, and how tokens are metered.
</Card>
