Installation
Install RelayPlane using your preferred package manager.
Proxy Installation
The proxy is the easiest way to get started. It provides an OpenAI-compatible endpoint with full observability and governance.
1# npm2npm install @relayplane/proxy34# yarn5yarn add @relayplane/proxy67# pnpm8pnpm add @relayplane/proxySDK Installation
For building multi-step AI workflows with the fluent builder API:
1# npm2npm install @relayplane/sdk34# yarn5yarn add @relayplane/sdk67# pnpm8pnpm add @relayplane/sdkProvider Dependencies
Install the SDK for each AI provider you plan to use:
1# OpenAI2npm install openai34# Anthropic (Claude)5npm install @anthropic-ai/sdk67# Google (Gemini)8npm install @google/generative-ai910# For structured output (recommended)11npm install zodYou only need the SDKs for providers you actually use. Local models (Ollama) don't require any SDK.
Environment Variables
Set up your API keys:
1# .env2ANTHROPIC_API_KEY=sk-ant-...3OPENAI_API_KEY=sk-...4GOOGLE_API_KEY=...56# Optional: RelayPlane cloud7RELAYPLANE_API_KEY=rp_...Available Packages
| Package | Description |
|---|---|
@relayplane/proxy | OpenAI-compatible proxy server with cost tracking |
@relayplane/core | Core routing and optimization logic |
@relayplane/ledger | Local usage tracking and analytics |
For most users,
@relayplane/proxy is all you need. It includes everything required for intelligent routing and cost optimization.Verify Installation
1# If installed globally2relayplane-proxy --version3# RelayPlane Proxy v0.2.145# Or with npx (no install required)6npx @relayplane/proxy --versionGlobal Installation (Recommended)
For the best experience, install the proxy globally:
1npm install -g @relayplane/proxy23# Now you can run from anywhere:4relayplane-proxy