What problem does it solve?
This Skill enables developers to integrate with OpenRouter's TypeScript SDK to access 300+ AI models through a single, type-safe callModel interface, eliminating boilerplate and manual model wiring.
Core Features & Use Cases
- Type-safe interface: Strongly typed callModel usage with IDE autocomplete and OpenAPI-generated model types.
- Streaming & multi-turn support: Consume responses incrementally and orchestrate tool calls in multi-turn conversations.
- Tooling ecosystem: Define and invoke tools with zod schemas, including dynamic parameter adjustments and stop conditions.
- Dynamic parameters: Compute model selection and behavior based on conversation context.
- Real-world use cases: Build AI agents, automated workflows, and interactive assistants in TypeScript projects.
Quick Start
Install the SDK with npm install @openrouter/sdk, then initialize the client using your API key:
- Create a client: import OpenRouter from '@openrouter/sdk'; const client = new OpenRouter({ apiKey: process.env.OPENROUTER_API_KEY });