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

# OpenRouter

> Configure OpenRouter, Agno's model class for unified access to language models via OpenRouter's Chat Completions API.

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](https://agno-v2.mintlify.site/reference/models/openai-like.md) and accepts all of its parameters.


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