Skip to content

Open source

Haarness Router

One OpenAI-compatible endpoint in front of every model provider, on your own server and with your own keys: native adapters, aliases with safe fallback and a built-in dashboard, in a single stateless Rust binary. Open source under MIT.

cargo run --release --bin haarness-router -- --config config.toml
Run it yourselfSource opens soon

No prebuilt binaries or images yet: it builds from source with Rust and a C compiler. Until the repository opens, write to [email protected] to run it.

The Haarness Router dashboard: provider health, models, fallback aliases, circuit health and live router activity
01

Native adapters, not shims

Anthropic Messages, Gemini and Vertex AI, Bedrock Converse and OpenAI's Responses API are spoken natively. Tools, structured output, reasoning, images, PDFs, audio and video are translated, or refused before any upstream call.

02

Aliases and safe fallback

One model name can mean this model, else that one. The router moves on only when a target cannot be reached or answers 408, 429 or 5xx before its first event, behind a circuit breaker for each target.

03

Your keys stay on the server

Provider keys are read once from environment variables and are never returned or logged. Clients send an optional router key of their own, which is never forwarded.

04

A dashboard in the same binary

Provider health, models and routes, live metrics and a playground at /ui, and Prometheus at /metrics. Nothing else to deploy.

05

Built for load

Bounded request bodies and stream frames, deadlines, backpressure and cancellation when a client disconnects. A local ten-minute soak held 10,000 streams without an error.

06

It routes, and that is all

No billing, no user database, no provider marketplace and no prompt storage. It logs one line per request, without prompts, headers or keys.

How it fits

Point any OpenAI client at it

Call any provider's model by name, or an alias you define. Every OpenAI SDK works unchanged.

  • OpenAI
  • Anthropic
  • Gemini
  • Vertex AI
  • Amazon Bedrock
  • Groq
  • Mistral
  • xAI
  • DeepSeek
  • Together
  • Fireworks
  • Any OpenAI-compatible server

Its models appear in Desktop, the terminal UI and the CLI.Connect it to Haarness

[providers.openai]
kind = "openai"
api_key_env = "OPENAI_API_KEY"

[providers.anthropic]
kind = "anthropic"
api_key_env = "ANTHROPIC_API_KEY"

# Ask for "fast": this model, else the next
[aliases.fast]
targets = ["openai/gpt-5-nano", "anthropic/claude-haiku-4-5-20251001"]

Self-hosted or managed

One API.Your server, or ours.

Haarness Router and the managed router in Haarness Cloud speak the same OpenAI-compatible API, so switching later only means changing the base URL and the key.

Haarness RouterMIT

Free software you run yourself. You pay each provider directly.

  • Your own provider keys, on your server
  • On your machine or inside your network
  • No account, no billing, no prompt storage
  • Aliases, fallback and a dashboard built in
Run it yourselfSource opens soon
Managed routerHosted

Run for you by Haarness Cloud and billed in credits.

  • One key for every model we carry
  • Metered exactly, at published rates
  • Spending caps and per-key model lists
  • Usage history in your account