Set up Respan
Set up Respan
- Sign up — Create an account at platform.respan.ai
- Create an API key — Generate one on the API keys page
- Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Use AI
Use AI
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
This integration is for the Respan gateway.
What is Claude Agent SDK?
The Claude Agent SDK (claude-agent-sdk) is a framework for building agent workflows powered by Claude. Route Claude API calls through the Respan gateway so only a single RESPAN_API_KEY is needed for both the LLM call and trace export.
Example projects
Example projects
Quickstart
Step 1: Install packages
Step 2: Set environment variables
ANTHROPIC_API_KEY needed — the gateway handles authentication.
Step 3: Point the agent to the Respan gateway
Step 4: Verify
Open the Logs page to see your gateway requests.Examples
Tool use via gateway
Run agents with tools, all routed through the gateway.Gateway URL construction
The Anthropic SDK automatically appends/v1/messages to ANTHROPIC_BASE_URL. The Respan gateway exposes Claude at the /anthropic path.
ClaudeAgentOptions.env (Python) or exporter.withOptions({ env }) (JavaScript):
| Variable | Value | Purpose |
|---|---|---|
ANTHROPIC_BASE_URL | {BASE_URL}/anthropic | Routes API calls through gateway |
ANTHROPIC_AUTH_TOKEN | RESPAN_API_KEY | Auth token for the subprocess |
ANTHROPIC_API_KEY | RESPAN_API_KEY | API key for Anthropic SDK |
Looking for tracing integration? See Tracing > Claude Agent SDK.