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

# Models

> Router modes and the full MESH model catalogue. `GET /v1/models` is always the live source of truth.

MESH supports two ways to pick a model: **router modes** (let MESH choose) and **explicit model
IDs** (pin a specific model).

Pass any of the IDs below as the `model` field on `/v1/chat/completions`. Receipts identify which
model was actually used.

## Router modes

| Mode       | Behavior                                                         |
| ---------- | ---------------------------------------------------------------- |
| `auto`     | Balanced choice — picks the best-fit model for the request shape |
| `cheapest` | Lowest expected cost                                             |
| `fast`     | Lowest expected latency                                          |
| `best`     | Highest-quality model for the request class                      |

## MESH house tier

MESH-curated models for everyday workloads. Pricing covers input / output per million tokens.

| Model           | Context | Modalities  | Capabilities                  | Input / Output (USD/1M) |
| --------------- | ------- | ----------- | ----------------------------- | ----------------------- |
| `mesh/swift`    | 128k    | text        | chat, streaming               | $0.035 / $0.14          |
| `mesh/balanced` | 300k    | text, image | chat, vision, streaming       | $0.06 / $0.24           |
| `mesh/pro`      | 300k    | text, image | chat, vision, streaming       | $0.80 / $3.20           |
| `mesh/premier`  | 1M      | text, image | chat, vision, streaming       | $2.50 / $12.50          |
| `mesh/embed`    | 8k      | text        | embeddings (`/v1/embeddings`) | \$0.02 / —              |

## Anthropic

| Model                    | Context | Modalities  | Capabilities                                                 | Input / Output |
| ------------------------ | ------- | ----------- | ------------------------------------------------------------ | -------------- |
| `mesh/claude-haiku-4.5`  | 200k    | text, image | chat, structured output, tools, vision, streaming            | $1 / $5        |
| `mesh/claude-sonnet-4.5` | 200k    | text, image | chat, structured output, tools, vision, streaming            | $3 / $15       |
| `mesh/claude-sonnet-4.6` | 200k    | text, image | chat, structured output, tools, vision, streaming            | $3 / $15       |
| `mesh/claude-opus-4.5`   | 200k    | text, image | chat, structured output, tools, vision, reasoning, streaming | $5 / $25       |
| `mesh/claude-opus-4.6`   | 200k    | text, image | chat, structured output, tools, vision, reasoning, streaming | $5 / $25       |

## Meta Llama

| Model                   | Context | Modalities  | Capabilities                                      | Input / Output |
| ----------------------- | ------- | ----------- | ------------------------------------------------- | -------------- |
| `mesh/llama-3.1-8b`     | 128k    | text        | chat, structured output, tools, streaming         | $0.22 / $0.22  |
| `mesh/llama-3.3-70b`    | 128k    | text        | chat, structured output, tools, streaming         | $0.72 / $0.72  |
| `mesh/llama-4-scout`    | 128k    | text, image | chat, structured output, tools, vision, streaming | $0.17 / $0.66  |
| `mesh/llama-4-maverick` | 128k    | text, image | chat, structured output, tools, vision, streaming | $0.24 / $0.97  |

## Mistral

| Model                  | Context | Modalities  | Capabilities                                      | Input / Output |
| ---------------------- | ------- | ----------- | ------------------------------------------------- | -------------- |
| `mesh/ministral-8b`    | 32k     | text        | chat, structured output, tools, streaming         | $0.15 / $0.15  |
| `mesh/ministral-14b`   | 128k    | text        | chat, structured output, tools, streaming         | $0.20 / $0.60  |
| `mesh/devstral`        | 128k    | text        | chat, structured output, tools, streaming         | $0.40 / $2.00  |
| `mesh/mistral-large-3` | 128k    | text        | chat, structured output, tools, streaming         | $0.50 / $1.50  |
| `mesh/pixtral-large`   | 128k    | text, image | chat, structured output, tools, vision, streaming | $2.00 / $6.00  |

## DeepSeek

| Model              | Context | Modalities | Capabilities                                  | Input / Output |
| ------------------ | ------- | ---------- | --------------------------------------------- | -------------- |
| `mesh/deepseek-v3` | 128k    | text       | chat, structured output, streaming            | $0.62 / $1.85  |
| `mesh/deepseek-r1` | 128k    | text       | chat, reasoning, structured output, streaming | $0.62 / $1.85  |

## OpenAI gpt-oss

| Model               | Context | Modalities | Capabilities                       | Input / Output |
| ------------------- | ------- | ---------- | ---------------------------------- | -------------- |
| `mesh/gpt-oss-20b`  | 128k    | text       | chat, structured output, streaming | $0.07 / $0.20  |
| `mesh/gpt-oss-120b` | 128k    | text       | chat, structured output, streaming | $0.155 / $0.62 |

## OpenAI (chat + reasoning)

| Model              | Context | Modalities  | Capabilities                                      | Input / Output  |
| ------------------ | ------- | ----------- | ------------------------------------------------- | --------------- |
| `mesh/gpt-4o`      | 128k    | text, image | chat, structured output, tools, vision, streaming | $2.50 / $10.00  |
| `mesh/gpt-4o-mini` | 128k    | text, image | chat, structured output, tools, vision, streaming | $0.15 / $0.60   |
| `mesh/gpt-4-turbo` | 128k    | text, image | chat, structured output, tools, vision, streaming | $10.00 / $30.00 |
| `mesh/o1`          | 200k    | text        | chat, reasoning, streaming                        | $15.00 / $60.00 |
| `mesh/o1-mini`     | 128k    | text        | chat, reasoning, streaming                        | $3.00 / $12.00  |
| `mesh/o3`          | 200k    | text        | chat, reasoning, tools, streaming                 | $10.00 / $40.00 |
| `mesh/o3-mini`     | 200k    | text        | chat, reasoning, tools, streaming                 | $1.10 / $4.40   |
| `mesh/o4-mini`     | 200k    | text, image | chat, reasoning, tools, vision, streaming         | $1.10 / $4.40   |

## Google Gemma

| Model              | Context | Modalities  | Capabilities            | Input / Output |
| ------------------ | ------- | ----------- | ----------------------- | -------------- |
| `mesh/gemma-3-4b`  | 128k    | text, image | chat, vision, streaming | $0.04 / $0.08  |
| `mesh/gemma-3-12b` | 128k    | text, image | chat, vision, streaming | $0.09 / $0.29  |
| `mesh/gemma-3-27b` | 128k    | text, image | chat, vision, streaming | $0.23 / $0.38  |

## Alibaba Qwen

| Model              | Context | Modalities  | Capabilities                                      | Input / Output |
| ------------------ | ------- | ----------- | ------------------------------------------------- | -------------- |
| `mesh/qwen3-32b`   | 128k    | text        | chat, structured output, tools, streaming         | $0.20 / $0.60  |
| `mesh/qwen3-coder` | 256k    | text        | chat, structured output, tools, streaming         | $0.30 / $1.20  |
| `mesh/qwen3-vl`    | 128k    | text, image | chat, structured output, tools, vision, streaming | $0.50 / $1.50  |

## AI21 Jamba

| Model              | Context | Modalities | Capabilities    | Input / Output |
| ------------------ | ------- | ---------- | --------------- | -------------- |
| `mesh/jamba-mini`  | 256k    | text       | chat, streaming | $0.20 / $0.40  |
| `mesh/jamba-large` | 256k    | text       | chat, streaming | $2.00 / $8.00  |

## Moonshot Kimi

| Model                | Context | Modalities  | Capabilities                                      | Input / Output |
| -------------------- | ------- | ----------- | ------------------------------------------------- | -------------- |
| `mesh/kimi-k2.5`     | 200k    | text, image | chat, structured output, tools, vision, streaming | $0.60 / $2.50  |
| `mesh/kimi-thinking` | 200k    | text        | chat, reasoning, structured output, streaming     | $0.60 / $2.50  |

## Z.AI GLM

| Model                | Context | Modalities | Capabilities                              | Input / Output |
| -------------------- | ------- | ---------- | ----------------------------------------- | -------------- |
| `mesh/glm-4.7-flash` | 128k    | text       | chat, streaming                           | $0.10 / $0.30  |
| `mesh/glm-4.7`       | 128k    | text       | chat, structured output, tools, streaming | $0.50 / $1.50  |
| `mesh/glm-5`         | 128k    | text       | chat, structured output, tools, streaming | $0.80 / $2.40  |

## Writer Palmyra

| Model             | Context | Modalities | Capabilities                       | Input / Output |
| ----------------- | ------- | ---------- | ---------------------------------- | -------------- |
| `mesh/palmyra-x4` | 128k    | text       | chat, structured output, streaming | $2.50 / $10.00 |
| `mesh/palmyra-x5` | 128k    | text       | chat, structured output, streaming | $0.60 / $6.00  |

## NVIDIA Nemotron

| Model                   | Context | Modalities  | Capabilities                       | Input / Output |
| ----------------------- | ------- | ----------- | ---------------------------------- | -------------- |
| `mesh/nemotron-super`   | 128k    | text        | chat, structured output, streaming | $0.60 / $1.80  |
| `mesh/nemotron-nano-vl` | 128k    | text, image | chat, vision, streaming            | $0.15 / $0.50  |

## MiniMax

| Model             | Context | Modalities | Capabilities                       | Input / Output |
| ----------------- | ------- | ---------- | ---------------------------------- | -------------- |
| `mesh/minimax-m2` | 200k    | text       | chat, structured output, streaming | $0.30 / $1.20  |

## Perplexity Sonar (search-grounded)

Sonar models answer with real-time web search citations. Choose `mesh/sonar` for cheap factual
lookups, `mesh/sonar-pro` for higher-quality grounded answers with tool calling, and
`mesh/sonar-reasoning` when you want the model to reason over search results before answering.

| Model                  | Context | Modalities | Capabilities                           | Input / Output |
| ---------------------- | ------- | ---------- | -------------------------------------- | -------------- |
| `mesh/sonar`           | 127k    | text       | chat, web search, streaming            | $1.00 / $1.00  |
| `mesh/sonar-pro`       | 200k    | text       | chat, web search, tools, streaming     | $3.00 / $15.00 |
| `mesh/sonar-reasoning` | 127k    | text       | chat, web search, reasoning, streaming | $1.00 / $5.00  |

## xAI Grok

| Model              | Context | Modalities | Capabilities                              | Input / Output |
| ------------------ | ------- | ---------- | ----------------------------------------- | -------------- |
| `mesh/grok-4`      | 256k    | text       | chat, structured output, tools, streaming | $5.00 / $15.00 |
| `mesh/grok-4-fast` | 128k    | text       | chat, tools, streaming                    | $0.20 / $0.50  |
| `mesh/grok-3`      | 131k    | text       | chat, tools, streaming                    | $5.00 / $15.00 |
| `mesh/grok-3-mini` | 131k    | text       | chat, streaming                           | $0.30 / $0.50  |

## Picking a model

```json theme={null}
{ "model": "auto" }
{ "model": "mesh/balanced" }
{ "model": "mesh/claude-sonnet-4.5" }
```

`GET /v1/models` returns the **live machine-readable catalogue** — IDs, context length, pricing,
modalities, capabilities, supported parameters. `GET /v1/models/{id}` returns a single record. Treat
the live API as the source of truth; this page is updated periodically.

## Capability legend

* **streaming** — `stream: true` returns SSE deltas.
* **tools / tool calling** — accepts `tools[]` + `tool_choice`; returns `tool_calls` with
  `finish_reason: tool_calls`.
* **structured output** — accepts `response_format: { type: "json_object" | "json_schema" }`.
* **vision** — accepts `image_url` parts in messages.
* **reasoning** — model emits structured reasoning tokens.
* **web search** — model answers from real-time web search and returns citations alongside the
  completion.
* **embeddings** — addressed via `/v1/embeddings`.

Receipts include `x-mesh-upstream-cost-usd`, `x-mesh-margin-usd`, `x-mesh-total-usd`,
`x-mesh-receipt-id` on every response.
