API Integrations
OpenRouter seamlessly integrates with popular AI frameworks and SDKs. Choose your preferred integration method and get started in minutes.
TypeScript
Full TypeScript support with type-safe API client and response types
- Type-safe requests
- Auto-completion
- Error handling
- Async/await support
OpenAI SDK
Drop-in replacement for OpenAI's official SDK with extended model support
- Compatible API
- Extended models
- Easy migration
- Streaming support
LangChain
Seamlessly integrate with LangChain for advanced AI workflows
- Chain support
- Agent tools
- Memory systems
- Custom callbacks
Vercel AI SDK
Build AI-powered apps with Vercel's AI SDK and OpenRouter
- React hooks
- Streaming UI
- Edge runtime
- Next.js support
Why Use OpenRouter?
Unified API
Access multiple AI models through a single, consistent API interface.
Cost Optimization
Automatically route requests to the most cost-effective model for your needs.
High Availability
Built-in failover ensures your applications stay online even during provider outages.
Simple Billing
One invoice for all your AI model usage, with transparent pricing.
Quick Start
Get your API key from the API Keys page and choose an integration method above to begin building with OpenRouter.