Skip to content

Respan Gateway

Open-source LLM gateway in Rust. One endpoint for OpenAI, Anthropic, Gemini and every other vendor. Any SDK, any model, any tool.

Install: pip install respan-gateway

Works with Claude Code · 648 GitHub stars

Install

$pip install respan-gateway

Install command taken from the project's README or registry entry. Always review code before running it.

The universal adapter for AI.

Respan Gateway is a single Rust binary that sits between your code and every AI API. Point the SDK you already use at it, and it connects you to everything: chat models, images, video and voice from every major provider; tools for any model, from web search and memory to code sandboxes and any MCP server; and traffic control (format translation, fallback, retries and hedged requests), with a live log of every call. ▶ Watch the demo

Key features

  • Any client, any model OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and Gemini API clients can all call any model, with streaming, tools, images and reasoning translated.

  • Multimodal Realtime voice across vendors (an OpenAI Realtime client talks to Gemini Live, and back), plus images, speech, transcription, embeddings and video through OpenAI's or Gemini's APIs, to any vendor that has them.

  • MCP tools for every model Put MCP servers or built-in tool vendors behind the gateway, from web search to code sandboxes. It runs their tools inside chat requests, so a plain chat call can use them, whatever the client or model.

  • Traffic control Named routes, globs and provider/model; fallback, retries, cheapest or fastest; and hedged requests that race a slow call against a second provider.

  • Observability A live request log with cost, latency and tokens for every call, and traces in Respan, where span-02 analyzes how your agents behave.

  • Best-in-class performance 0.07 ms of added latency, 56,000 requests per second and 31 MB of memory in our benchmarks: about 3× the throughput of the next fastest gateway we tested.

  • Write your own plugin in minutes Every feature above is a plugin, built on the same public Rust API you can use: one trait with four hooks. Start from the plugin guide or an example such as guardrails, PII masking or billing.

Quickstart

1. Install

pip install respan-gateway

Or cargo install respan-gateway, or a GitHub release.

2. Run it with your keys

export OPENAI_API_KEY=sk-...
respan-gateway

No config file needed: every vendor whose key is set becomes a provider.

3. Call any model from any SDK

from anthropic import Anthropic

client = Anthropic(base_url="http://localhost:8080", api_key="unused")
reply = client.messages.create(
    model="gpt-6-luna", max_tokens=256,
    messages=[{"role": "user", "content": "Hello from the Anthropic SDK"}])
print(reply.content[0].text)

The web UI is at localhost:8080/ui/. Next: configuration and MCP tools.

Other ways to run it

  • Python, in-process — Run the gateway inside your Python app, with no server.
  • Embed in Rust — Mount the gateway in your own Rust service.
  • Docker — docker run -p 8080:8080 -e OPENAI_API_KEY -e RESPAN_CLIENT_KEYS= ghcr.io/respanai/respan-gateway on any container host; listening beyond localhost, it needs a client key.

Performance

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

MCP serverDatabases+105 this week

Explore related