Skip to main content

ZidoRouter

Self-hosted gateway for LLM APIs. One process, zero dependencies beyond Python stdlib.

Point any OpenAI-compatible client at it and get: provider failover, circuit breakers, prompt caching, token savings, per-key metering, budget caps, and a live dashboard.

Install

Requires Python 3.9+.

pip install .

Quickstart

  1. Add a provider (repeat for each upstream you have):
zidorouter add groq https://api.groq.com/openai/v1 gpt-4o-mini YOUR_GROQ_KEY
  1. Set a dashboard password:
zidorouter dashboard-pass
  1. Serve:
zidorouter serve 8764

Now point your client at http://127.0.0.1:8764/v1 and use any dashboard-issued key (zid-...) as the API key.

Dashboard

Open http://127.0.0.1:8764/ and log in with the password you set. From there:

  • add or remove providers, toggle them on or off
  • issue and revoke client keys
  • set model aliases (combos) and per-provider prices
  • watch usage, cache hit rate, and audit logs live

Features

  • Multi-provider pool with automatic failover and per-provider circuit breakers
  • Health probes and status at a glance
  • Auto prompt-cache markers (opt out per request or globally)
  • Context slimming: trims old tool output and folds mid-history so tokens are never sent twice
  • Per-key rate limits, daily budgets, and usage metering
  • Cost estimation per provider
  • Webhooks for failover, budget exceeded, and provider recovery events
  • Audit log of every request

CLI

zidorouter list                 # show providers
zidorouter add NAME BASE MODEL KEY [NOTES]
zidorouter remove NAME
zidorouter dashboard-pass       # set or change the dashboard password
zidorouter serve [PORT] [HOST]  # default: 8764 on 127.0.0.1

Running as a service (systemd)

[Unit]
Description=ZidoRouter
After=network.target

[Service]
ExecStart=/usr/bin/env zidorouter serve 8764
Restart=always

[Install]
WantedBy=multi-user.target

Notes

State lives in ~/.zidorouter/ (keys, aliases, audit log, metrics). Back that folder up and you can move the whole gateway to a new machine in minutes.

Metadata

Release files for zidorouter 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zidorouter 1.0.1
File Size Uploaded
zidorouter-1.0.1.tar.gz 43.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zidorouter 1.0.1
File Interpreter ABI Platform
zidorouter-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 91.0 kB

Release files / zidorouter-1.0.1.tar.gz

Download URL zidorouter-1.0.1.tar.gz
Size 43.6 kB
Tags Source
SHA-256 checksum
How to use checksums
571b8034c2007f9c96f4af1278b3cd7136cc63a65e5a6b11345aa992c5858449
BLAKE2b-256 checksum
How to use checksums
6ac0b6ebe68041ab5958fb25856c5e1845548fa39e185d93099f550eacb1f7af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / zidorouter-1.0.1-py3-none-any.whl

Download URL zidorouter-1.0.1-py3-none-any.whl
Size 47.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed1d3ee7797bf35c5d4ab239bf9d8237ef22adf50eb2339ece4534f38c0c83c6
BLAKE2b-256 checksum
How to use checksums
e71011ce900b60073df26a8ec8ebb7334592934e3cafb972f2ff1df20a2f0aaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page