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

# Models

> Query available models, compare capabilities, and browse model metadata via the Models API.

ARouter provides access to hundreds of models from top providers through a single unified API. You can browse models on the [ARouter website](https://arouter.ai/models) or use the API directly.

## Query Parameters

The Models API supports query parameters to filter results.

### `output_modalities`

Filter models by their output capabilities. Accepts a comma-separated list of modalities or `"all"` to include every model.

| Value        | Description                                 |
| ------------ | ------------------------------------------- |
| `text`       | Models that produce text output (default)   |
| `image`      | Models that generate images                 |
| `audio`      | Models that produce audio output            |
| `embeddings` | Embedding models                            |
| `all`        | Include all models, skip modality filtering |

```bash theme={null}
# Default — text models only
curl "https://api.arouter.ai/v1/models" \
  -H "Authorization: Bearer lr_live_xxxx"

# Image generation models only
curl "https://api.arouter.ai/v1/models?output_modalities=image" \
  -H "Authorization: Bearer lr_live_xxxx"

# Text and image models
curl "https://api.arouter.ai/v1/models?output_modalities=text,image" \
  -H "Authorization: Bearer lr_live_xxxx"

# All models regardless of modality
curl "https://api.arouter.ai/v1/models?output_modalities=all" \
  -H "Authorization: Bearer lr_live_xxxx"
```

### `supported_parameters`

Filter models by the API parameters they support. For example, to find models that support tool calling:

```bash theme={null}
curl "https://api.arouter.ai/v1/models?supported_parameters=tools" \
  -H "Authorization: Bearer lr_live_xxxx"
```

## List Models

```
GET /v1/models
```

Returns the full list of models available to your API key.

```bash theme={null}
curl https://api.arouter.ai/v1/models \
  -H "Authorization: Bearer lr_live_xxxx"
```

### Response Format

```json theme={null}
{
  "data": [
    {
      "id": "openai/gpt-5.4",
      "canonical_slug": "openai/gpt-5.4",
      "name": "GPT-5.4",
      "created": 1748000000,
      "description": "OpenAI's flagship multimodal model with state-of-the-art performance.",
      "context_length": 128000,
      "architecture": {
        "input_modalities": ["text", "image"],
        "output_modalities": ["text"],
        "tokenizer": "cl100k_base",
        "instruct_type": "chatml"
      },
      "pricing": {
        "prompt": "0.000005",
        "completion": "0.000015",
        "request": "0",
        "image": "0.00765",
        "web_search": "0",
        "internal_reasoning": "0",
        "input_cache_read": "0.0000025",
        "input_cache_write": "0.000005"
      },
      "top_provider": {
        "context_length": 128000,
        "max_completion_tokens": 16384,
        "is_moderated": true
      },
      "supported_parameters": [
        "tools",
        "tool_choice",
        "max_tokens",
        "temperature",
        "top_p",
        "structured_outputs",
        "response_format",
        "stop",
        "frequency_penalty",
        "presence_penalty",
        "seed"
      ],
      "per_request_limits": null,
      "default_parameters": null,
      "expiration_date": null
    }
  ]
}
```

## Model Object Schema

Each model in the `data` array contains the following fields:

| Field                  | Type             | Description                                                           |
| ---------------------- | ---------------- | --------------------------------------------------------------------- |
| `id`                   | `string`         | Unique model identifier used in API requests, e.g. `"openai/gpt-5.4"` |
| `canonical_slug`       | `string`         | Permanent slug for the model that never changes                       |
| `name`                 | `string`         | Human-readable display name                                           |
| `created`              | `number`         | Unix timestamp of when the model was added to ARouter                 |
| `description`          | `string`         | Detailed description of the model's capabilities                      |
| `context_length`       | `number`         | Maximum context window size in tokens                                 |
| `architecture`         | `Architecture`   | Technical capabilities object                                         |
| `pricing`              | `Pricing`        | Cost structure for using this model (USD per token)                   |
| `top_provider`         | `TopProvider`    | Configuration details for the primary provider                        |
| `per_request_limits`   | `object \| null` | Rate limiting information (`null` if no limits)                       |
| `supported_parameters` | `string[]`       | Array of supported API parameters                                     |
| `default_parameters`   | `object \| null` | Default parameter values (`null` if none)                             |
| `expiration_date`      | `string \| null` | Deprecation date (`null` if not deprecated)                           |

### Architecture Object

```typescript theme={null}
{
  "input_modalities": string[],  // e.g. ["text", "image"]
  "output_modalities": string[], // e.g. ["text"]
  "tokenizer": string,           // e.g. "cl100k_base"
  "instruct_type": string | null // e.g. "chatml", null if not applicable
}
```

### Pricing Object

All pricing values are in **USD per token**. A value of `"0"` means the feature is free.

```typescript theme={null}
{
  "prompt": string,              // Cost per input token
  "completion": string,          // Cost per output token
  "request": string,             // Fixed cost per API request
  "image": string,               // Cost per image input
  "web_search": string,          // Cost per web search operation
  "internal_reasoning": string,  // Cost for internal reasoning tokens
  "input_cache_read": string,    // Cost per cached input token read
  "input_cache_write": string    // Cost per cached input token write
}
```

### Top Provider Object

```typescript theme={null}
{
  "context_length": number,         // Provider-specific context limit
  "max_completion_tokens": number,  // Maximum tokens in response
  "is_moderated": boolean           // Whether content moderation is applied
}
```

### Supported Parameters

The `supported_parameters` array lists which OpenAI-compatible parameters work with a model:

| Parameter            | Description                   |
| -------------------- | ----------------------------- |
| `tools`              | Function calling capabilities |
| `tool_choice`        | Tool selection control        |
| `max_tokens`         | Response length limiting      |
| `temperature`        | Randomness control            |
| `top_p`              | Nucleus sampling              |
| `reasoning`          | Internal reasoning mode       |
| `include_reasoning`  | Include reasoning in response |
| `structured_outputs` | JSON schema enforcement       |
| `response_format`    | Output format specification   |
| `stop`               | Custom stop sequences         |
| `frequency_penalty`  | Repetition reduction          |
| `presence_penalty`   | Topic diversity               |
| `seed`               | Deterministic outputs         |

## Using Models

Use the `id` directly as the `model` field in your requests:

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(
        base_url="https://api.arouter.ai/v1",
        api_key="lr_live_xxxx",
    )

    # List available models
    models = client.models.list()
    for model in models.data:
        print(model.id)

    # Use a specific model
    response = client.chat.completions.create(
        model="anthropic/claude-sonnet-4.6",
        messages=[{"role": "user", "content": "Hello!"}],
    )
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import OpenAI from "openai";

    const client = new OpenAI({
      baseURL: "https://api.arouter.ai/v1",
      apiKey: "lr_live_xxxx",
    });

    // List available models
    const models = await client.models.list();
    for (const model of models.data) {
      console.log(model.id);
    }

    // Use a specific model
    const response = await client.chat.completions.create({
      model: "anthropic/claude-sonnet-4.6",
      messages: [{ role: "user", content: "Hello!" }],
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl https://api.arouter.ai/v1/models \
      -H "Authorization: Bearer lr_live_xxxx"
    ```
  </Tab>
</Tabs>

## Filtering by Supported Parameters

Find models that support tool calling:

```bash theme={null}
curl "https://api.arouter.ai/v1/models?supported_parameters=tools" \
  -H "Authorization: Bearer lr_live_xxxx"
```

Find models that support structured outputs:

```bash theme={null}
curl "https://api.arouter.ai/v1/models?supported_parameters=structured_outputs" \
  -H "Authorization: Bearer lr_live_xxxx"
```

## Auto Routing

In addition to specific model IDs, ARouter supports automatic model selection:

| Model    | Description                                                             |
| -------- | ----------------------------------------------------------------------- |
| `"auto"` | ARouter automatically selects the best available model for your request |

```bash theme={null}
curl https://api.arouter.ai/v1/chat/completions \
  -H "Authorization: Bearer lr_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"model": "auto", "messages": [{"role": "user", "content": "Hello!"}]}'
```

The response `model` field always shows the model that was actually used. See [Model Routing](/en/model-routing#auto-routing) for details.

## Model Variants

You can append suffixes to any model ID to influence routing behavior:

| Suffix      | Effect                                                         |
| ----------- | -------------------------------------------------------------- |
| `:nitro`    | Route to the highest-throughput instance — optimized for speed |
| `:floor`    | Route to the lowest-cost instance — optimized for price        |
| `:free`     | Route to the free-tier instance (rate limits apply)            |
| `:thinking` | Enable extended reasoning / chain-of-thought mode              |

```json theme={null}
{"model": "openai/gpt-5.4:nitro"}   // fastest
{"model": "openai/gpt-5.4:floor"}   // cheapest
{"model": "deepseek/deepseek-r1:thinking"} // reasoning mode
```

See [Model Variants](/en/guides/features/model-variants) for the full reference.

## Tokenization

Different models tokenize text differently. Some models (GPT, Claude, Llama) break text into multi-character chunks; others tokenize by character (PaLM). This means token counts — and therefore costs — vary between models even for identical inputs and outputs.

Costs are billed according to the tokenizer for the model in use. Use the `usage` field in each response to get the exact token counts:

```json theme={null}
{
  "usage": {
    "prompt_tokens": 42,
    "completion_tokens": 128,
    "total_tokens": 170
  }
}
```

## Notes

* The model list is filtered by your account's enabled providers. If a provider is not enabled, its models will not appear.
* New models are added automatically as providers release them.
* Use model IDs from this list directly in the `model` field of your chat completion requests.

See [Providers](/en/providers) for a curated list of available providers and their flagship models.
