Capability filter
Requests needing tool calling, vision, or long context only ever see models that declare them. If nothing qualifies, the request fails loudly instead of silently downgrading.
Send OpenAI-compatible chat completions and embeddings through one API. MLRouter picks the model, absorbs provider failures, enforces the limits you set, and shows you exactly what happened on every request.
Why teams switch
Every provider you integrate directly is a contract, an outage, and a migration waiting to happen. MLRouter turns that into a setting.
Add 46 providers' worth of models to your product once. Switching between them later is a setting, not a sprint.
MLRouter speaks the API your team already uses. Point it at a new base URL and existing applications keep working unchanged.
When a provider degrades, traffic moves to a healthy one mid-flight. Your users see a response, not an incident.
Give every team, product, and environment its own budget, limits, and permitted models — and see the cost of each request.
Capabilities
Every surface lives in the same workspace: request routing, model analysis, key management, session services, policy enforcement, and operational visibility.
Select models by cost, latency, weighted pools, prefix, or automatic routing. Configure fallback behavior when a primary route cannot serve a request.
Cost · Latency · Weighted · Prefix · Auto
Compare token counts and estimated costs across models, check tokenizer drift, and assess migration safety using representative prompts before you switch.
Compare · Drift checks · Migration safety
Conversations keep their context across turns, interrupted responses pick up where they stopped, and sensitive requests can skip storage entirely.
Sessions · Work memory · Stream resumption
Build and publish MCP servers, then expose MLRouter's own tools over MCP with per-category scopes: chat, memory, billing, observability, team, and webhooks.
Build · Publish · Scoped tool access
Inspect request logs, token usage, cache metrics, provider health, and circuit-breaker state from one workspace — every request carries a trace ID.
Request logs · Analytics · Provider health
Manage API keys, roles, routing strategies, spend caps, rate limits, guardrails, and provider data policies without handing provider credentials to callers.
Keys · Roles · Limits · Policies
Enforce allowed and blocked models, per-request token ceilings, and spend limits. Classifiers inspect prompts and responses for PII, injection attempts, and unsafe content.
Allow/block · Token ceilings · Injection checks
Reusable configuration templates that pin a system prompt, request defaults, and an allowed model subset, so every team starts from a known configuration.
System prompts · Defaults · Allowed models
Register an OpenAI-compatible endpoint your organization operates. Its model IDs join the catalog and route ahead of a hosted model sharing the same ID.
Bring your own endpoint · Catalog priority
Routing
A key's strategy decides which model serves a request — but only after the candidate set has been narrowed to models that are actually allowed to see it.
costCheapest model that can still serve the request
Cheapest model that can still serve the request
Scores candidates on input and output price against your estimated token count, so the choice reflects the actual shape of the request rather than a headline rate.
latencyFastest healthy provider
Fastest healthy provider
Uses observed p50 and p95 latency per provider, continuously updated from real traffic, and skips providers whose circuit breaker is open.
weightedSplit traffic across a pool
Split traffic across a pool
Distributes requests over an admin-defined pool by weight — useful for canarying a new model or splitting load across two providers.
prefixSend exactly what was asked for
Send exactly what was asked for
Passes the requested model through untouched. This is the default for a key with no strategy configured.
autoBalance quality against cost
Balance quality against cost
A quality/cost dial picks from the models a key is allowed to use. Requesting "auto" as the model works under every strategy.
These filters shape the candidate set. If they eliminate every model, the request fails with a reason header rather than quietly routing somewhere you didn't authorize.
Requests needing tool calling, vision, or long context only ever see models that declare them. If nothing qualifies, the request fails loudly instead of silently downgrading.
Exclude free or preview tiers from automatic selection. These constrain what the router may pick on your behalf — naming a model explicitly still works.
Per-provider policies such as no-training and zero retention. Providers that don't satisfy the required policies are removed from the candidate set before selection.
Route only through providers carrying the certifications you require — SOC 2, HIPAA, ISO 27001, or GDPR — with escalations reported in the response headers.
When a prompt outgrows the selected model's context window, routing escalates to a model that can hold it rather than returning a truncation error.
Providers that start erroring are tripped out of rotation and probed for recovery, so a degraded provider stops absorbing your traffic.
Governance
Nine checks sit between your application and the provider. Any of them can stop a request before it costs you money, and all of them are on the record afterwards.
The key identifies the team, product, or environment behind the request, and the rules that apply to it.
Traffic limits protect you from a runaway job burning a month of budget in an afternoon.
The cost is checked against the workspace balance before a provider is ever contacted.
Your policies run against the prompt: permitted models, size limits, and checks for sensitive or unsafe content.
Only models that meet the request's needs and your compliance requirements stay in the running.
Your routing rule picks from that shortlist, skipping any provider currently having a bad day.
The request is translated to the chosen provider's format and streamed back to your application.
If that provider fails mid-request, the next one in line takes over without your users noticing.
Actual usage settles against your balance, and the whole decision is recorded for you to review.
Request controls
MLRouter keeps application requests and workspace controls separate: your client sends a familiar API request, while your team defines the rules around it.
Read the API referenceChoose cost, latency, weighted, prefix, or automatic routing. Request-scoped overrides are also supported.
Configure fallback chains, or supply a request-specific model list when a primary route cannot complete a request.
Set a routing strategy, spend cap, rate limit, and guardrail policy for an API key without exposing provider credentials to callers.
Review the resolved model, routing strategy, estimated cost, and trace identifier in response headers and request logs.
Register an organization-operated OpenAI-compatible endpoint. Its active model ID appears in the catalog and is routed ahead of a hosted model with the same ID.
Getting started
Set the MLRouter base URL and API key, then send OpenAI-shaped chat completion requests from your application.
Create API keys and configure routing strategy, spend caps, rate limits, guardrails, and fallback behavior.
Use response headers and request logs to review the resolved model, routing strategy, estimated cost, provider, and latency.
OpenAI-compatible
Your existing code, SDKs, and prompts keep working. Two lines of configuration is the whole migration.
Each response reports which model served it, why it was chosen, and what it cost — no extra instrumentation.
Move a workload to a cheaper or faster model from the dashboard. Production picks it up on the next request.
API surface
Inference speaks OpenAI. Everything your team configures around it — keys, policies, presets, logs — is a first-class REST endpoint too, so the whole control plane is automatable.
/v1/chat/completionsOpenAI-shaped chat requests, including streaming responses.
/v1/embeddingsVector embeddings through an OpenAI-compatible endpoint.
/v1/modelsAvailable models with catalog details and provider health.
/v1/api-keysCreate, scope, rotate, and revoke keys without touching provider credentials.
/v1/guardrailsPolicies for allowed models, token ceilings, and spend limits.
/v1/presetsReusable prompt and parameter templates.
/v1/classifiersEvaluators for PII, intent, and unsafe content.
/v1/requestsRequest log with routing decisions, usage, and cost per call.
/v1/providers/healthLive provider scores, error rates, and latency percentiles.
/public/statusPublic provider status — no authentication required.
Data & compliance
Compliance requirements are a routing input, not a policy document. A request that cannot be served within your constraints is refused rather than downgraded.
Require SOC 2, HIPAA, ISO 27001, or GDPR coverage and route only through providers that carry it.
Attach no-training and zero-retention requirements to provider keys, applied per organization.
Mark sensitive workloads so their content is processed and then discarded, never written to storage.
Express a region for providers that serve more than one, using measured regional latency baselines.
Require single sign-on for workspace access, with role-based permissions on every control endpoint.
Run the gateway against your own OpenAI-compatible endpoints when traffic must stay inside your network.
Pricing
Model usage is billed from workspace credits on every plan, including Free. A subscription only changes how often you can use the MLRouter-specific features listed below.
1 credit = $0.0001
$1 buys 10,000 credits.
Reserved, then settled
Estimated cost is held up front and reconciled against real token usage.
5% purchase fee
Applied when you buy credits. Token costs themselves are passed through.
Credits-based pay-as-you-go. Every routing and observability feature included.
5 uses / month of each gated feature
For small teams and growing projects.
50 uses / month of each gated feature
For production workloads at scale.
No cap on gated features
Each of these has its own counter, reset at the start of every calendar month. Routing, fallback, observability, key management, and the model catalog are never capped.
Questions
No. MLRouter speaks the OpenAI chat-completions and embeddings API, so pointing an existing OpenAI client at https://mlrouter.com/v1 with an MLRouter key is usually the whole change. Streaming, tool calls, and multi-modal inputs keep the same request shape.
Create a workspace, generate a key, and route your first request in minutes. No card required to start.