> ## 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.

# Chat

> OpenRouter Chat API examples: basic agents, ordered model fallback, retries, structured output, and tool use.

Use [OpenRouter's Chat API](https://openrouter.ai/docs/sdks/python/api-reference/chat) to reach multiple models through one endpoint. Give an agent an ordered fallback list so a request that hits a rate limit, timeout, or overload retries on the next model.

For details, see examples in `cookbook/90_models/openrouter/chat`.

| Example | Description |
| - | - |
| [Basic](https://agno-v2.mintlify.site/examples/models/openrouter/chat/basic.md) | Run a minimal OpenRouter agent with sync, streaming, and async response variants. |
| [Dynamic Model Router](https://agno-v2.mintlify.site/examples/models/openrouter/chat/dynamic-model-router.md) | Dynamic models provide automatic failover when the primary model encounters rate limits, timeouts, unavailability or model overload. |
| [Retry](https://agno-v2.mintlify.site/examples/models/openrouter/chat/retry.md) | Review retry settings and why invalid model IDs cannot reliably exercise the retry path. |
| [Structured Output](https://agno-v2.mintlify.site/examples/models/openrouter/chat/structured-output.md) | Compare JSON mode and native structured outputs on OpenRouter by generating a MovieScript Pydantic model. |
| [Tool Use](https://agno-v2.mintlify.site/examples/models/openrouter/chat/tool-use.md) | Give an OpenRouter agent WebSearchTools and stream the answer in both sync and async runs. |


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