ModelPilot Documentation
Complete guide to building reliable autonomous agents with ModelPilot's intelligent routing platform. Create routers that automatically select the best model for each workflow step—optimizing for planning, coding, and execution phases.
Quick Start
Connect your agent to ModelPilot in minutes. Make your first optimized request and see the routing in action.
API Reference
Complete API documentation compatible with OpenAI SDK. Integrate with LangChain, AutoGen, and CrewAI.
Core Capabilities
Agent Routing
Automatic model selection based on workflow phase (planning vs execution), task complexity, and agent type.
Universal Access
Give your agents access to 100+ models from OpenAI, Anthropic, Google, and more through a single API.
Self-Healing
Automatic failover and retry logic ensures your autonomous agents don't crash in production loops.
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.