Optimize your AI infrastructure with intelligent, policy-driven routing.
cost: Cheapest model that meets capability requirements.speed: Lowest TTFT (Time to First Token) provider.quality: Highest ELO benchmark score (e.g., Claude Opus, GPT-4).P402 integrates natively with OpenRouter as a primary meta-provider. This enables instant access to over 300+ specialized models through a single orchestration layer.
Access GPT-5.2, Claude 4.5, and Gemini 3.0 the moment they drop, with zero manual adapter updates required.
Use a single OPENROUTER_API_KEY to settle requests across hundreds of models while maintaining 1% platform fee transparency.
Control routing behavior per-request via the configuration object.
{
"mode": "balanced",
"maxCost": 0.05,
"provider": "anthropic", // Force a provider (optional)
"model": "claude-3-opus-20240229" // Force a model (optional)
}