Skip to main content

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.

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
Recommended
Purpose-built SDK with full ModelPilot features
npm install modelpilot
javascript
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!' }]
});
View Full Guide
OpenAI
OpenAI SDK
Drop-in Compatible
Use your existing OpenAI code with zero changes
npm install openai
javascript
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!' }]
});
View Migration Guide

Popular Topics

Ready to get started?
Create your account and start routing AI requests intelligently.