For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
    • Overview
  • Tracing
  • Gateway
      • OpenAI Agents
      • Claude Agent SDK
      • Vercel AI SDK
      • Pydantic AI
      • CrewAI
      • Haystack
      • LangChain
      • LangGraph
      • Langflow
      • LlamaIndex
      • AutoGen
      • DSPy
      • Google ADK
      • Smolagents
      • Strands Agents
      • AgentSpec
      • Guardrails
      • Agno
      • MCP
      • BeeAI
      • Pipecat
      • Superagent
  • Others
  • Migrating
    • Braintrust
    • Portkey
    • Langfuse
LogoLogo
DiscordPlatform
On this page
  • Setup
  • Switch models
GatewayAgent Frameworks

OpenAI Agents (gateway)

Was this page helpful?
Previous

Claude Agent SDK (gateway)

Next
Built with

Route LLM calls through the Respan gateway to use 250+ models from different providers. Only your Respan API key is needed — no separate provider keys required.

Setup

1

Install packages

$pip install respan-ai respan-instrumentation-openai-agents
2

Set environment variables

$export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"

No OPENAI_API_KEY needed — the Respan gateway handles provider authentication.

3

Point to the Respan gateway

1import os
2import asyncio
3from openai import AsyncOpenAI
4from agents import Agent, Runner, set_default_openai_client
5
6client = AsyncOpenAI(
7 api_key=os.getenv("RESPAN_API_KEY"),
8 base_url="https://api.respan.ai/api",
9)
10set_default_openai_client(client)
11
12agent = Agent(
13 name="Assistant",
14 instructions="You only respond in haikus.",
15)
16
17async def main():
18 result = await Runner.run(agent, "Tell me about recursion.")
19 print(result.final_output)
20
21asyncio.run(main())

Switch models

Change the model parameter on any agent to use 250+ models from different providers through the same gateway.

1agent = Agent(
2 name="Assistant",
3 model="claude-sonnet-4-5-20250929", # Use Anthropic via gateway
4 instructions="You are a helpful assistant.",
5)

See the full model list.