Skip to navigation

Connect your app

Point your SDK, framework or coding agent at the gateway by changing its base URL.

To send your app’s calls through respan-gateway, change the base URL in your client. Your code and model names stay the same.

Base URLs

ClientBase URL
OpenAI SDK, and frameworks built on it (LangChain, Vercel AI SDK, OpenAI Agents, …)http://localhost:8080/v1
Anthropic SDKhttp://localhost:8080
Google GenAI SDKhttp://localhost:8080
Claude CodeANTHROPIC_BASE_URL=http://localhost:8080

Use your gateway’s address in place of localhost:8080. For the API key, send a client key. With no client keys set, any value works.

Examples

from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="your-client-key")
response = client.chat.completions.create(
model="claude-sonnet-4-5-20250929",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Use an integration guide

The guides under Gateway integrations work with respan-gateway too. Follow a guide, then make two changes:

  1. Replace its base URL, such as https://api.respan.ai/api/, with the gateway’s from the table above.
  2. Replace RESPAN_API_KEY with your client key.

Features of the hosted Respan gateway, such as respan_params, prompt management, caching and span-router, aren’t part of respan-gateway. To log your calls in Respan, turn on Respan tracing.