Strands Agents (gateway)

Route Strands Agents’ underlying LLM calls through the Respan gateway to use 250+ models from different providers. Only your RESPAN_API_KEY is needed for the gateway request path; no separate provider credentials are required in the client.

Setup

1

Install packages

$pip install "strands-agents[openai]"
2

Set environment variables

$export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"

No provider credentials are needed in your application; the Respan gateway handles provider authentication.

3

Point Strands Agents to the Respan gateway

Use the OpenAI-compatible model adapter pointing at the Respan gateway.

1import os
2from strands import Agent
3from strands.models.openai import OpenAIModel
4
5model = OpenAIModel(
6 model_id="gpt-5.5",
7 client_args={
8 "api_key": os.environ["RESPAN_API_KEY"],
9 "base_url": "https://api.respan.ai/api",
10 },
11)
12
13agent = Agent(model=model)
14print(agent("What is the capital of France?"))

Switch models

Change the model_id parameter on OpenAIModel to use another OpenAI model through the same gateway-backed endpoint.

1OpenAIModel(model_id="gpt-5.5", client_args={"api_key": ..., "base_url": "https://api.respan.ai/api"})
2OpenAIModel(model_id="gpt-5-mini", client_args={"api_key": ..., "base_url": "https://api.respan.ai/api"})

OpenAIModel is Strands Agents’ OpenAI-compatible model 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.