Agno (gateway)

Route Agno’s underlying OpenAI-compatible LLM calls through the Respan gateway to use 1000+ models from different providers. Only your Respan API key is needed when provider access is configured in Respan.

Setup

1

Install packages

pip install agno openai
2

Set environment variables

export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"
export RESPAN_BASE_URL="https://api.respan.ai/api"

No OPENAI_API_KEY is needed when the request is routed through the Respan gateway.

3

Point Agno to the Respan gateway

import os
from agno.agent import Agent
from agno.models.openai import OpenAIChat
respan_api_key = os.environ["RESPAN_API_KEY"]
respan_base_url = os.getenv("RESPAN_BASE_URL", "https://api.respan.ai/api")
agent = Agent(
name="Gateway Agent",
model=OpenAIChat(
id="gpt-5-mini",
api_key=respan_api_key,
base_url=respan_base_url,
),
instructions="Keep the answer short and concrete.",
)
result = agent.run("Name two practical uses for distributed tracing.")
print(result.content)

Switch models

Change the id passed to OpenAIChat to use another OpenAI model through the same gateway-backed endpoint.

agent = Agent(
model=OpenAIChat(
id="gpt-5.5",
api_key=os.environ["RESPAN_API_KEY"],
base_url=os.getenv("RESPAN_BASE_URL", "https://api.respan.ai/api"),
),
)

OpenAIChat is Agno’s OpenAI-compatible adapter. This page avoids showing Claude or Gemini inside that OpenAI-named adapter; use the Respan API or OpenAI SDK gateway pages for provider-neutral Claude and Gemini examples.

See the full model list.