Open source · self-hosted · single-user

One endpoint for the AI
you already pay for.

YUIO — Your Unified Inference Orchestrator. A self-hosted router that puts one OpenAI-compatible API in front of every model provider you use, and routes each request cheapest-tier-first with quota-aware pacing. You run it, on your own accounts.

# one URL, every provider, cheapest-first
curl https://your-host/v1/chat/completions \
  -H "Authorization: Bearer $KEY" \
  -d '{"model":"auto","messages":[{"role":"user","content":"hi"}]}'
# → tries the cheapest available lane, escalates on failure. never stalls.

What it is

A single, model-agnostic router you host yourself. Define your lanes in one config.yaml — no model name, provider, host, or price is hard-coded. Every request cascades from the cheapest available lane upward, escalating on error, empty answer, or a quality-gate rejection, and never refuses to try.

🔀

Cascade, lowest-first

Cheapest lane that's up answers; escalate on failure/empty/quality-reject. If every breaker is open, it tries them all anyway.

Quota-aware pacing

Paces consumption to each plan's reset window and prefers the least-used lane, so you burn what you've prepaid instead of hitting walls.

🧩

Single binary

No Docker, no database required. Runs on a 512 MB box. One config.yaml, one process.

Features

Everything in the box — reliability, cost visibility, and safety, not just routing.

  • OpenAI-compatible/v1/chat/completions with SSE streaming; drop it into any OpenAI client.
  • Reliability — per-lane circuit breakers, health probes, per-error-class retries, sticky routing, durable crash-recovery queue.
  • Plan / Execute — decompose a goal into arbitrated drafts, run steps sequentially, synthesize one deliverable.
  • Live roles — worker = cheapest available, planner/arbiter = most capable. Computed per request, no config.
  • Per-call cost itemization — every response carries cost + latency; plan/execute return a full per-model breakdown.
  • Quality gate — a reviewer lane scores answers; low scores escalate.
  • Auth & budgets — hashed API keys, per-key daily/monthly USD budgets (402 on cap), per-IP limits, bad-key lockout.
  • Privacy mode — request/response bodies purged after completion by default; never land in telemetry.

Bring your own lanes

YUIO routes across whatever you configure. Recommended, cleanly-supported lanes:

🟢

z.ai GLM coding plan

OpenAI-compatible and explicitly sold for use in third-party tools. Cheap, fast, and clean to run.

🔑

Pay-per-token API keys

OpenAI, Anthropic, Google Gemini and friends — the normal, sanctioned API-key path.

🖥️

Local models

llama.cpp / Ollama on your own hardware. Zero marginal cost, fully private.

🌐

OpenRouter & others

Any OpenAI-compatible endpoint is a lane. Aggregators and free tiers included.

Your accounts, your box, your rules. YUIO is a personal tool you run on your own subscriptions and API keys. It is not a multi-tenant service and never routes requests on anyone else's behalf. Advanced consumer-subscription lanes may exist in your config — using them is your responsibility to comply with each provider's Terms of Service. Some providers prohibit third-party access to subscription plans; YUIO does not encourage or enable circumventing any provider's terms.

How it compares

The commercial gateways are excellent — for teams, breadth, and governance. YUIO competes on a different axis: a single-binary, quota-pacing orchestrator for one person.

ProductShapeBest forSelf-hostQuota-pacing focus
OpenRouterHosted aggregatorInstant breadthNo
LiteLLMOSS proxy (Docker+DB)Platform teamsYes
PortkeyGateway + governanceEnterpriseYes
Cloudflare AI GatewayEdge control planeCloudflare usersNo
YUIOSingle-binary routerSolo devs / homelabYesYes

Honest note: quota-aware subscription rotation isn't unique — open-source proxies like CLIProxyAPI and claude-code-router do it too. YUIO's bet is packaging: one opinionated binary with pacing built in, not a proxy plus bolt-on dashboards.

Who it's for

✅ A good fit

  • Solo developers and AI power users
  • Homelab / self-hosting enthusiasts
  • People holding several AI subscriptions who want one endpoint with sane pacing
  • Anyone who wants to own their routing, on their own box

🚫 Not for

  • Teams needing multi-tenancy, RBAC, or SSO
  • Anyone needing an SLA, SOC 2, or vendor support
  • Reselling or serving models to other users
  • Mission-critical production without your own hardening

Quickstart

Five minutes from clone to first response.

# 1. install
python -m pip install -r requirements.txt

# 2. configure (one lane boots with no network key — a loopback baseline)
cp config.example.yaml config.yaml

# 3. run (loopback-only by default)
python app.py            # uvicorn on :8402

# 4. use
curl -s http://127.0.0.1:8402/v1/chat \
  -H 'Content-Type: application/json' \
  -d '{"messages":[{"role":"user","content":"hello"}]}'

Edit config.yaml to add your lanes (model id, key env var, prices). Secrets stay in env vars, never in config. Full reference in the repo.