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# npm
2npm install @relayplane/proxy
3
4# yarn
5yarn add @relayplane/proxy
6
7# pnpm
8pnpm add @relayplane/proxy

SDK Installation

For building multi-step AI workflows with the fluent builder API:

1# npm
2npm install @relayplane/sdk
3
4# yarn
5yarn add @relayplane/sdk
6
7# pnpm
8pnpm add @relayplane/sdk

Provider Dependencies

Install the SDK for each AI provider you plan to use:

1# OpenAI
2npm install openai
3
4# Anthropic (Claude)
5npm install @anthropic-ai/sdk
6
7# Google (Gemini)
8npm install @google/generative-ai
9
10# For structured output (recommended)
11npm install zod
You 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# .env
2ANTHROPIC_API_KEY=sk-ant-...
3OPENAI_API_KEY=sk-...
4GOOGLE_API_KEY=...
5
6# Optional: RelayPlane cloud
7RELAYPLANE_API_KEY=rp_...

Available Packages

PackageDescription
@relayplane/proxyOpenAI-compatible proxy server with cost tracking
@relayplane/coreCore routing and optimization logic
@relayplane/ledgerLocal 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 globally
2relayplane-proxy --version
3# RelayPlane Proxy v0.2.1
4
5# Or with npx (no install required)
6npx @relayplane/proxy --version

Global Installation (Recommended)

For the best experience, install the proxy globally:

1npm install -g @relayplane/proxy
2
3# Now you can run from anywhere:
4relayplane-proxy