TypeScript SDK
TypeScript SDK
Official OpenRouter TypeScript SDK documentation
The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.
The SDK provides three core benefits:
Actionable error messages:
Type-safe streaming:
Get your API key from openrouter.ai/settings/keys.