Skip to main content
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.

Authentication

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

Example

Use Nexus with your Agent:
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")

View more examples here.

Params

ParameterTypeDefaultDescription
idstr"gpt-4o-mini"The id of the model to use through Nexus
namestr"Nexus"The name of the model
providerstr"Nexus"The provider of the model
api_keyOptional[str]NoneThe API key for Nexus (defaults to NEXUS_API_KEY env var)
base_urlstr"https://api.nexusflow.ai/v1"The base URL for the Nexus API
Nexus also supports the params of OpenAI.
I