Ume AI Gateway
GitHub
Open source · .NET 10 · Built in Umeå

One gateway between your organisation and every model.

Virtual keys, budgets, routing that keeps personal data on-prem, and fallback when a provider goes down. The gateway stores usage metadata only, never prompts or responses.

The admin UI overview: needs attention, key figures, daily spend and provider healthThe admin UI overview: needs attention, key figures, daily spend and provider healthThe admin UI overview: needs attention, key figures, daily spend and provider health
1.0 msAdded latencyMedian overhead per chat request, one client
17 888Messages per secondStreaming chat on 4 vCPUs
0Database calls per requestKeys and routing are cached in memory
0Prompts storedUsage metadata only, by design

Measured 27 Oct 2026: the gateway in a Docker container limited to 4 vCPUs, against a fake LLM that answers instantly. How we measure

Made for the public sector

Control over AI that you can explain to a data protection officer.

Personal data stays where it should

Detect Swedish personnummer, samordningsnummer, emails, phone numbers and IBANs, then block, redact or keep the request on-prem.

  • Per-key PII policy
  • Residency limits: on-prem, EU, external
  • Prompts and responses never stored

Budgets, not surprises

Set limits per department, team and key. Alerts fire at your thresholds and requests stop when a budget runs out.

  • Monthly, weekly or quarterly periods
  • Limits in USD, like provider prices
  • Exports for finance and BI

Keeps working when a provider doesn't

Ordered fallback within the allowed residencies. A circuit breaker moves a failing provider to the back of the line.

  • Retries only what is safe to retry
  • Never falls back mid-stream
  • Health visible in the admin UI
Routing rules

Apps ask for a model. Rules decide where it goes.

Write a condition on headers, team, budget use or personal data, then send matching requests to weighted targets with fallbacks. Test a sample request before you rely on it. The response header x-ume-rule tells you which rule applied.

pii_detected && endpoint == "chat_completions" → send to ume/chat-onprem · no fallbacks, on purpose
Read the routing guide
The routing rules page with the rule Personal data stays on-prem at the top of the list
Drop-in compatible

Keep the SDKs your teams already use.

Point the OpenAI or Anthropic SDK at the gateway and swap in a virtual key. Chat, Responses, Messages, embeddings, speech to text, images and live audio all go through one pipeline: key, limits, rules, residency, budget, fallback.

/v1/chat/completions/v1/responses/v1/messages/v1/embeddings/v1/audio/transcriptions/v1/images/generations/v1/realtime/v1/models
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.example.se/v1",
    api_key=os.environ["UME_API_KEY"],   # a virtual key
)

reply = client.chat.completions.create(
    model="ume/chat-standard",           # an alias, not a vendor model
    messages=[{"role": "user", "content": "Sammanfatta ärendet"}],
)
Admin UI

Built for the people who run it, in three themes.

Departments, teams, keys, budgets and alerts in one place. Every release is tested with axe against WCAG 2.2 AA in light, dark and Lumen, plus keyboard, reflow, forced colours and target size.

The Keys page with a key's details open in a drawerThe Keys page with a key's details open in a drawerThe Keys page with a key's details open in a drawer
KeysCreate, rotate with a grace period, or revoke. Secrets are shown once.
The Budgets and alerts page with budgets per department and teamThe Budgets and alerts page with budgets per department and teamThe Budgets and alerts page with budgets per department and team
Budgets & alertsSee who is close to their limit before requests start failing.
The usage dashboard with cost, requests, latency and time to first tokenThe usage dashboard with cost, requests, latency and time to first tokenThe usage dashboard with cost, requests, latency and time to first token
UsageLatency, time to first token and cost per model, department and rule.
Deploy

Runs on your own servers, behind your own login.

Running in about ten minutes on a laptop with Docker.

Demo data, a fake LLM and test users are included. It's a demonstrator, not a production approval, legal compliance attestation or WCAG certification.