> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-service-account.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenRouter

The OpenRouter model provides unified access to various language models through OpenRouter.

## Parameters

| Parameter    | Type                  | Default                          | Description                                                               |
| ------------ | --------------------- | -------------------------------- | ------------------------------------------------------------------------- |
| `id`         | `str`                 | `"gpt-5.4-mini"`                 | The id of the OpenRouter model to use                                     |
| `name`       | `str`                 | `"OpenRouter"`                   | The name of the model                                                     |
| `provider`   | `str`                 | `"OpenRouter"`                   | The provider of the model                                                 |
| `api_key`    | `Optional[str]`       | `None`                           | The API key for OpenRouter (defaults to OPENROUTER\_API\_KEY env var)     |
| `base_url`   | `str`                 | `"https://openrouter.ai/api/v1"` | The base URL for the OpenRouter API                                       |
| `max_tokens` | `int`                 | `1024`                           | Maximum number of tokens to generate                                      |
| `models`     | `Optional[List[str]]` | `None`                           | Fallback model IDs for dynamic model routing when the primary model fails |

`OpenRouter` extends [OpenAILike](/reference/models/openai-like) and accepts all of its parameters.
