AI gateway
An OpenAI-compatible gateway in front of every model vendor you use, with the decision built in: which model answers, what may not, what it costs, what happens when a provider fails - and a trace per request. Hosted on a free plan or self-hosted, Apache-2.0.
Free plan, no card. Open source under Apache-2.0; self-hosting is free forever.
From the benchmark
1
base URL to change
The gateway speaks the OpenAI chat, embeddings, Responses, moderations, audio and images APIs and the Anthropic Messages API, so existing clients move by changing the base URL and the key.
The whole benchmark, with the cases the router lostThe problem
Keys, retries and logging in one place is a start. But the application still names the model, still decides what to do when it fails, still has no idea what the request cost until the invoice, and still sends personal data wherever the model happens to be.
How the router answers it
Every request through /v1/chat/completions with model 'auto' is read, scored and routed; name a model and the gateway still applies your policy and prices the call before it is made.
A failed or saturated provider re-routes to the next best candidate under the same rules, and the trace records both the failure and the recovery.
Data boundary, region, tenant, allowed targets, per-key and per-tenant budgets refuse before a call; the governance report shows every control in force.
A real request
The response carries the model that answered, the cost and a decision id; the dashboard shows the trace with every candidate ranked and every policy rejection.
from openai import OpenAI
client = OpenAI(base_url="https://opensmartroute.ai/v1",
api_key=OSR_API_KEY)
reply = client.chat.completions.create(
model="auto", # the router picks
messages=[{"role": "user", "content": "<prompt>"}],
)
print(reply.choices[0].message.content)
print(reply.model) # the model that answeredRead next
Install
docker run --rm -p 8000:8000 crosrua2c6onyidguw.azurecr.io/opensmartroute:latestOr no install at all: the hosted API answers a plain curl with the decision, and the browser extension shows the price and the router's pick under the composer of the AI chat sites you already use.
OpenSmartRoute is open source and the free plan keeps the full trace of every decision. Create a workspace, mint a key and send the request above.
Free plan, no card. Fifteen thousand decisions a month with the full trace.