OpenRouter Integration
Integration Status: In Progress - This integration is currently under development. The PR is pending merge: OpenRouterTeam/ai-sdk-provider#191
Overview
OpenRouter provides a unified API for accessing multiple AI models with intelligent routing, fallback strategies, and cost optimization. The 0G integration brings decentralized compute models to the OpenRouter ecosystem.What is OpenRouter?
OpenRouter is a platform that provides:- Unified API: Single interface to access multiple AI providers and models
- Intelligent Routing: Automatic model selection based on performance and cost
- Fallback Strategies: Automatic failover when models are unavailable
- Cost Optimization: Choose models based on price and performance requirements
- Usage Analytics: Detailed insights into model usage and costs
Installation
Once the integration is merged, you’ll be able to install it with:Supported Models
Model | Provider Address | OpenRouter Model ID | Best For |
---|---|---|---|
llama-3.3-70b-instruct | 0xf07240Efa67755B5311bc75784a061eDB47165Dd | 0g/llama-3.3-70b-instruct | General conversations, content generation |
deepseek-r1-70b | 0x3feE5a4dd5FDb8a32dDA97Bed899830605dBD9D3 | 0g/deepseek-r1-70b | Complex reasoning, analysis, problem-solving |
Basic Usage
Simple Model Access
Model Comparison
Advanced Features
Intelligent Routing
Route requests to the best available model based on your criteria:Cost Optimization
Usage Analytics
Streaming and Real-time
Streaming with Fallbacks
Real-time Model Switching
Configuration Options
Provider Configuration
Model-Specific Settings
Integration Patterns
Multi-Provider Setup
Load Balancing
Benefits of 0G + OpenRouter
Unified Interface
Access 0G models alongside other providers through a single API
Intelligent Routing
Automatic model selection and fallback strategies
Cost Optimization
Choose the most cost-effective models for your use case
Privacy Options
Use decentralized 0G models when privacy is a concern
Migration from Direct APIs
Getting Started
- Wait for the integration to be merged - Track progress at OpenRouterTeam/ai-sdk-provider#191
- Sign up for OpenRouter at openrouter.ai
- Install the package once available:
npm install @openrouter/nebula-sdk-provider
- Configure your providers including 0G credentials
- Start routing between different AI models!
Community & Support
- GitHub: OpenRouterTeam/ai-sdk-provider
- OpenRouter Docs: openrouter.ai/docs
- Discord: OpenRouter community for integration support
- 0G Discord: Join for 0G-specific integration help