AUTO-ROUTER
Drop-in OpenAI-compatible routing that cuts latency, slashes costs, and never goes down. Point your SDK at haimaker and route across 200+ models automatically.
OpenAI SDK compatible · Zero refactor required · Ships in minutes
Everything You Need to Route Smarter
Latency optimization, cost reduction, dynamic failover, and full OpenAI compatibility — active on every request.
Latency Optimization
Real-time provider scoring routes every request to the fastest available model. A few milliseconds of overhead — your p99s stay sharp.
Cost Reduction
Dynamic model selection minimizes spend without sacrificing output quality. Route cheap where it counts, fast where it matters.
Automatic Fallback
Instant failover across providers with zero manual intervention. When a provider degrades or errors, traffic reroutes before your users notice.
Dynamic Routing Logic
Rule-based and performance-driven routing adapts at runtime. Combine latency thresholds, cost budgets, and custom tags in a single config.
OpenAI-Compatible Endpoint
Drop in your existing SDK calls — no refactor required. Swap one base URL and every provider integration works out of the box.
All capabilities are active on every request — no feature flags, no additional config.
Zero Refactor. Instant Routing.
Point your existing OpenAI SDK at haimaker and get dynamic multi-model routing in one line.
import OpenAI from "openai";
// Direct provider call — no routing, no fallback
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});
const response = await client.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: prompt }],
}); import OpenAI from "openai";
// Auto-Router — one line change, zero refactor
const client = new OpenAI({
apiKey: process.env.HAIMAKER_API_KEY,
baseURL: "https://api.haimaker.ai/v1", // ← swap this
});
const response = await client.chat.completions.create({
model: "haimaker/auto", // routing + fallback automatic
messages: [{ role: "user", content: prompt }],
}); from openai import OpenAI
# Direct provider call — no routing, no fallback
client = OpenAI(
api_key=os.getenv("OPENAI_API_KEY"),
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": prompt}],
) from openai import OpenAI
# Auto-Router — one line change, zero refactor
client = OpenAI(
api_key=os.getenv("HAIMAKER_API_KEY"),
base_url="https://api.haimaker.ai/v1", # ← swap this
)
response = client.chat.completions.create(
model="haimaker/auto", # routing + fallback automatic
messages=[{"role": "user", "content": prompt}],
) The only change required: swap your base URL to https://api.haimaker.ai/v1 and set the
model to haimaker/auto. Your existing SDK calls, auth headers, and message format stay untouched —
haimaker handles latency scoring, model selection, and failover transparently.
How Auto-Router Works
Every request is scored, routed, and protected in real time — automatically.
Request Received
Your request hits the OpenAI-compatible endpoint. No SDK changes, no refactoring — just point your existing client at haimaker.
$ POST /v1/chat/completionsReal-Time Scoring
Auto-Router evaluates latency and cost across all available models in real time. Every request is scored dynamically — not by static config.
$ p50 ≈ 8ms routing overheadOptimal Model Selected
The highest-scoring model is selected and the request is forwarded transparently. Cost and latency are balanced automatically, per request.
$ model.select(bestScore)Automatic Fallback
If a provider fails or degrades, the router re-routes instantly to the next cheapest capable model. Zero downtime, zero manual intervention.
$ fallback.trigger(< 200ms)Auto-Router intercepts in-process and stays deterministic — your application sees a standard OpenAI response while scoring, routing, and fallback happen beneath the surface, with no code changes required.
Why Engineers Choose Auto-Router
No lock-in, no rewrites, no babysitting infrastructure.
One baseURL swap. Done.
haimaker speaks OpenAI's API natively. No SDK rewrites, no custom middleware, no adapter layers. If your code already calls the OpenAI endpoint, you're 60 seconds from live multi-model routing.
✓ Zero refactor requiredRouting that runs itself.
Forget cron jobs polling provider health or hand-tuning round-robin weights. haimaker evaluates latency, cost, and availability per request in real time — then routes automatically, with instant failover if a provider degrades.
✓ No infrastructure babysittingDynamic cost + latency decisions on every call.
Static routing configs go stale. haimaker scores each request against live telemetry — token cost, p50/p95 latency, current error rates — then picks the optimal model dynamically. No YAML tweaks, no redeploys.
✓ Adapts without redeploymentCommon Questions
Terse, technical answers about how Auto-Router works under the hood.
Is Auto-Router compatible with the OpenAI SDK?
Yes — Auto-Router exposes a fully OpenAI-compatible endpoint. Swap your base URL to https://api.haimaker.ai/v1 and set the model to haimaker/auto, and every existing SDK call, streaming response, and function-calling pattern works without modification. No new SDK. No refactor.
Which model providers does Auto-Router support?
Auto-Router routes across 200+ models from every major provider — OpenAI, Anthropic, Google, Mistral, Cohere, DeepSeek, Qwen, xAI and more. The routing layer abstracts provider-specific APIs, so your code never needs to handle per-provider differences.
What happens when a provider returns an error or times out?
Fallback kicks in automatically. If a provider exceeds the latency threshold or returns a 5xx / rate-limit error, Auto-Router falls back to the next cheapest capable model based on real-time scoring — transparent to the caller. Fallback decisions are made in-flight with no client-side retry logic required.
Does the router itself add meaningful latency to my requests?
No. Routing happens in-process: the scorer runs in memory against a continuously updated table, with no blocking network hop and no AI classifier in the request path. Overhead is on the order of a few milliseconds, and dynamic routing reduces observed p95 latency by steering requests away from congested providers.
How does the pricing model work?
You pay only for the underlying model inference tokens — Auto-Router adds no per-token markup. Cost reduction comes from dynamic model selection, which routes to lower-cost capable models when quality targets are still met, plus cost-saving rules the router learns from your own traffic.
How do I get started?
Point your existing OpenAI SDK at https://api.haimaker.ai/v1, set the model to haimaker/auto, and you are live — dynamic routing, automatic fallback, and cost optimization with no other code changes. Grab a free API key and check the docs for routing rules, budgets, and per-route overrides.
Still have questions? Contact our team →
Start Routing Smarter Today
Drop in Auto-Router, optimize latency and cost, and ship with confidence — in minutes.
OpenAI-compatible endpoint · No refactoring required · Live in minutes