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

# Nexus

> Use Nexus router models with Agno agents.

v2.0.6 (Introduced in v2.0.6)

Nexus is a routing platform that provides endpoints for various Large Language Models through a unified API interface.

Explore Nexus's capabilities and documentation [here](https://nexusrouter.com/).

## Authentication

Nexus requires API keys for the underlying model providers. Set the appropriate environment variables for the models you plan to use:

```bash Mac theme={null}
export OPENAI_API_KEY=***
export ANTHROPIC_API_KEY=***
```

```bash Windows theme={null}
setx OPENAI_API_KEY ***
setx ANTHROPIC_API_KEY ***
```

## Example

Use `Nexus` with your `Agent`:

```python agent.py theme={null}
from agno.agent import Agent
from agno.models.nexus import Nexus

agent = Agent(model=Nexus(id="anthropic/claude-sonnet-4-20250514"), markdown=True)

# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story")

```

> [!NOTE]
>
> View more examples [here](https://agno-v2.mintlify.site/models/providers/gateways/nexus/usage/basic-stream.md).

## Params

| Parameter | Type | Default | Description |
| - | - | - | - |
| `id` | `str` | `"openai/gpt-4"` | The id of the model to use through Nexus |
| `name` | `str` | `"Nexus"` | The name of the model |
| `provider` | `str` | `"Nexus"` | The provider of the model |
| `api_key` | `Optional[str]` | `"not-provided"` | The API key sent to the Nexus router. Not required for a local deployment |
| `base_url` | `str` | `"http://localhost:8000/llm/v1/"` | The base URL for the Nexus API |

`Nexus` also supports the params of [OpenAI](https://agno-v2.mintlify.site/reference/models/openai.md).


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