Skip to main content
The OpenRouter TypeScript SDK is a type-safe toolkit for building AI-powered features in any JS or TS runtime, giving you access to 400+ models across providers through a single unified API.

Installation

npm
pnpm
bun
yarn
This package is published as an ES Module (ESM) only. For applications using CommonJS, use await import("@openrouter/sdk") to import and use this package.

Quickstart

API reference

Browse the API reference for each resource in the sidebar. Type definitions for every request, response, model, and operation are linked inline from each resource page.