ModelPilot Documentation
Complete guide to building with ModelPilot's intelligent AI model routing platform. Create routers that automatically select the best model for each request based on cost, speed, and quality.
Quick Start
Get started with ModelPilot in minutes. Make your first API request and see results.
API Reference
Complete API documentation with all parameters, response formats, and examples.
Key Features
Smart Routing
Automatic model selection based on cost, speed, quality, and carbon footprint.
Multi-Provider
Access 100+ models from OpenAI, Anthropic, Google, and more through one API.
Fallback Handling
Automatic failover to backup models ensures your application stays online.
Choose Your SDK
ModelPilot works with both our native SDK and the OpenAI SDK for easy migration.
ModelPilot SDK
RecommendedPurpose-built SDK with full ModelPilot features
npm install modelpilotjavascript
const ModelPilot = require('modelpilot');
const client = new ModelPilot({
apiKey: 'mp_xxx',
routerId: 'router_xxx'
});
const completion = await client.chat.completions.create({
messages: [{ role: 'user', content: 'Hello!' }]
});OpenAI SDK
Drop-in CompatibleUse your existing OpenAI code with zero changes
npm install openaijavascript
const { OpenAI } = require('openai');
const client = new OpenAI({
apiKey: 'mp_xxx',
baseURL: 'https://modelpilot.co/api/router/xxx'
});
const completion = await client.chat.completions.create({
messages: [{ role: 'user', content: 'Hello!' }]
});Popular Topics
Ready to get started?
Create your account and start routing AI requests intelligently.