Developer tools

SDKs

Optional Python and TypeScript SDKs on top of the OpenAI-compatible surface: typed header builders, a drop-in client that reads the gateway’s decision metadata, and typed access to the non-OpenAI surfaces.

Routeplane speaks the OpenAI wire protocol, so an SDK is never required — pointing your existing OpenAI client at the gateway is the whole integration. The official SDKs are an optional ergonomics layer on top of that: typed header builders, a drop-in client that reads the gateway's decision metadata, and typed access to the surfaces OpenAI clients don't know about (prompts, logs, FinOps, cache, residency).

Two layers, pick your depth

Both SDKs are built the same way, so what you learn in one carries to the other. You choose how much of the gateway you want to adopt:

Layer 1 — headers with your existing client

Routeplane's per-request behaviour (provider fallback, routing strategy, residency, FinOps labels) is all driven by x-routeplane-* request headers. The SDKs ship a typed builder — headers() in Python, createHeaders() in TypeScript — that produces exactly those headers as a plain map. It drops into any client's extra-headers escape hatch, so it works far beyond these SDKs: the stock OpenAI client, LangChain, LlamaIndex, CrewAI, or the Vercel AI SDK.

Layer 2 — the full client

The Routeplane client wraps the OpenAI client you already know — Routeplane subclasses openai.OpenAI in Python and extends the OpenAI client in TypeScript. It wires up auth, lets you set default routing once, decodes the gateway's response headers into typed metadata (which provider actually served the request, the cache disposition, spend headroom, whether PII was masked), and adds typed namespaces for the non-OpenAI surfaces.

You can always leave. Because the wire format is OpenAI's, an SDK is a convenience, not a lock-in. The header builder emits standard headers; the client is a thin subclass. Point base_url back at the provider and everything reverts to a plain OpenAI call.

Install

pythonPyPI
pip install routeplane
typescriptnpm
npm i @routeplane/sdk        # openai is an optional peer dependency

Which page do I want?

You want to…Go to
Use Routeplane from PythonPython SDK
Use Routeplane from TypeScript / NodeTypeScript SDK
Drive the gateway from your terminalCLI
Give an AI assistant (Claude Code, Cursor) gateway toolsMCP server
Use any other language, or just raw HTTPSDKs & clients

Both SDKs are Apache-2.0 and track the same OpenAI-compatible surface as the gateway. If your language has an OpenAI client but no Routeplane SDK, you lose nothing essential — see SDKs & clients for the base-URL-only approach and the full header reference.