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

# Nexus

> Use Nexus router models with Agno agents.

<Badge icon="code-branch" color="orange">
  <Tooltip tip="Introduced in v2.0.6" cta="View release notes" href="https://github.com/agno-agi/agno/releases/tag/v2.0.6">v2.0.6</Tooltip>
</Badge>

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:

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

  ```bash Windows theme={null}
  setx OPENAI_API_KEY ***
  setx ANTHROPIC_API_KEY ***
  ```
</CodeGroup>

## Example

Use `Nexus` with your `Agent`:

<CodeGroup>
  ```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")

  ```
</CodeGroup>

<Note> View more examples [here](/models/providers/gateways/nexus/usage/basic-stream). </Note>

## Params

| Parameter  | Type            | Default                         | Description                                                 |
| ---------- | --------------- | ------------------------------- | ----------------------------------------------------------- |
| `id`       | `str`           | `"gpt-4o-mini"`                 | 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]` | `None`                          | The API key for Nexus (defaults to NEXUS\_API\_KEY env var) |
| `base_url` | `str`           | `"https://api.nexusflow.ai/v1"` | The base URL for the Nexus API                              |

`Nexus` also supports the params of [OpenAI](/reference/models/openai).
