Step 01
Before it leaves
Checked on your device before anything is sent.
In the browser and on the desktop the draft is read first. You see what it will cost and what it would leak, and fix it with one click.
90 days of the enterprise, pro and team plans free, no card needed. See the plans
Open-source LLM router · Apache-2.0v2.1.0
Library, sidecar or hosted API
Embed the SDK in a Python service, call it from TypeScript, run the container beside your app, or use this platform. The OpenAI-compatible and Anthropic-compatible endpoints (chat, Responses, Messages, embeddings, moderations, audio, images) mean existing clients switch by changing one base URL.
pip install "opensmartroute[yaml]"
from opensmartroute import (
Objective, RequestConstraints, RouteRequest,
Router, load_rules, load_targets,
)
from opensmartroute.strategies import (
default_strategies,
)
router = Router(
load_targets("targets.yaml"),
strategies=[
load_rules("rules.yaml"),
*default_strategies(),
],
)
req = RouteRequest(
"Prove that sqrt(2) is irrational.",
constraints=RequestConstraints(
max_cost_per_1k=0.02,
),
objective=Objective(quality=1.0, cost=0.4),
)
d = router.route(req, plan=True)
print(d.target.id, f"{d.confidence:.2f}")
# per-strategy scores and rationales
print(d.trace.explain())
# who was filtered out, and why
print(d.trace.policy_rejections)Zero runtime dependencies. plan=True returns the ranked runners-up and every policy rejection with the winner.
Pricing
Every plan runs the same router with the same catalogue and policy. The free plan is enough to route real traffic and read the savings ledger before a card is ever asked for; self-hosting is free forever.
Questions developers ask
Get started
No SDK required for the hosted API; the Python package and the TypeScript client are there when you want them.
Email and password, no card. The Free plan includes 15,000 routed decisions a month with the full explanation trace.
Sign upKeys are shown once and stored hashed. Rotate or revoke them from the dashboard; every request is attributed to the key that made it.
Open keysChange one base URL. model="auto" lets the router decide; the answer comes back as a standard chat completion with the reason attached.
Before and after for your clientcurl -s https://api.opensmartroute.ai/v1/chat/completions \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Hello"}]}'{
"model": "llm-small",
"choices": [{ "message": { "role": "assistant",
"content": "Hello! How can I help?" } }],
"opensmartroute": {
"request_id": "req_7f3a…", "target": "llm-small",
"confidence": 0.91, "alternatives": ["llm-mid"],
"cost_usd": 0.000012, "latency_ms": 412
}
}OpenSmartRoute sits between your app and the AI models. Every request goes to the cheapest model that meets your quality, privacy and speed rules - with the reason attached. Change one URL; keep your code.
Step 02
While it routes
Every model, agent or tool that could answer is priced. Your policy runs first, then the candidates are ranked and the best value wins. If it fails, the next one answers.
Step 03
After it answers
The answer comes back with the model, the confidence, the alternatives and what each would have cost. The savings ledger adds it up; the audit chain makes it reproducible.
A card under the composer on ChatGPT, Claude, Gemini and the provider consoles: the price, anything personal in the draft and the model the task deserves - before you press send.
v2.0.0 · Chrome, Edge, Firefox
About the extensionOne shortcut over any app - Word, Outlook, Slack, your editor. Type, and the right model answers and says which one it was and what it cost.
v2.0.0 · Windows, macOS, Linux
About the desktop appWhat the bill says next to what the router would have charged for the same traffic. Download the report as CSV, a workbook or a PDF.
Free plan, no card. The analysis stays in your workspace and can be deleted at any time. For reference, traffic routed on this deployment has cost 53% less than sending every request to On-prem private model. How a saving is measured - the baseline, the prompts, the judges - is on the benchmark page.
Enterprise
SSO, tenants, data residency, an SLA and a contract.
For organisations with compliance needs
A standard chat completion. model is the target the router chose; the opensmartroute block carries the request id, the runner-up, the cost and the time, so you can send feedback on this answer later.
Prefer to run it yourself?
curl -LsSf https://opensmartroute.ai/install.sh | sh