Skip to content
You are reading the v2 docs, currently in beta.V1 docs
oRPC
Esc
↑↓navigate↵open⌘Jpreview
On this page

API Reference

Full signatures for every function, class, and type the oRPC packages export, generated from the TypeScript declarations each package publishes.

Each package name links to its reference on npmx: every export with its signature and description, generated from the TypeScript declarations the package publishes. The guides beside it show those APIs in use.

Core

Package Purpose Related Guides
@orpc/contract Define API contract as the single source of truth. Procedure Contract, Contract Router, Implementation, Generate from OpenAPI
@orpc/server Build APIs or implement contracts. Procedure, Router, Middleware, Context, RPC Handler
@orpc/client Consume APIs with end-to-end type safety. Client-Side Clients, Server-Side Clients, RPC Link, Error Handling
@orpc/openapi Add OpenAPI compatibility to APIs. OpenAPI Handler, OpenAPI Link, Specification, Scalar

Schema Validation

Package Purpose Related Guides
@orpc/zod JSON Schema converter for Zod. Zod
@orpc/valibot JSON Schema converter for Valibot. Valibot
@orpc/arktype JSON Schema converter for ArkType. ArkType

Built-in Features

Package Purpose Related Guides
@orpc/publisher Pub/Sub with memory, Redis, and Upstash adapters. Publisher
@orpc/ratelimit Rate limiting with memory, Redis, and Upstash adapters. Rate Limit
@orpc/experimental-lock Locking with memory, Redis, and Upstash adapters. Lock
@orpc/hibernation Leverage Hibernation APIs like Cloudflare’s WebSocket Hibernation. Hibernation
@orpc/json-schema Smart coercion for OpenAPI requests. Smart Coercion

Framework and Ecosystem Integrations

Package Purpose Related Guides
@orpc/next Integrate with Next.js Server Functions. Next.js
@orpc/ai-sdk Turn contracts and procedures into AI SDK tools. AI SDK
@orpc/mcp Expose procedures as MCP tools. MCP
@orpc/tanstack-query Integrate with TanStack Query. TanStack Query
@orpc/pinia-colada Integrate with Pinia Colada. Pinia Colada
@orpc/swr Integrate with SWR. SWR
@orpc/experimental-effect Integrate with Effect. Effect
@orpc/msw Mock procedures at the network level with typed MSW request handlers. MSW
@orpc/nest Implement your contract with NestJS. NestJS
@orpc/node Node.js plugins for static file serving and large uploads. Static File, Tmp File Upload, Batch Response Compression
@orpc/bun Bun Redis adapters for Publisher, Rate Limit, and Lock. Publisher, Rate Limit, Lock
@orpc/cloudflare Adapters for Cloudflare Workers. Publisher, Rate Limit, Lock, Traces
@orpc/trpc Reuse existing tRPC routers within oRPC. tRPC

Observability

Package Purpose Related Guides
@orpc/opentelemetry Distributed tracing with OpenTelemetry. OpenTelemetry
@orpc/pino Logging with Pino. Pino
@orpc/evlog Logging with Evlog. Evlog

Last updated on

Was this page helpful?