Ume AI Gateway
GitHub
Getting started

From zero to your first request.

Try it on your own machine with demo data, or set up a production host. You can switch paths at any time.

You need

  • .NET SDK 10.0.401
  • Aspire 13.6
  • Docker 28+
  • Node 24.15+
  1. Step 1: Install the admin UI packages

    Clone the repository, then install the UI dependencies once.

    PowerShell
    git clone https://github.com/thekim1/llmgateway.git
    Set-Location llmgateway\src\admin-ui
    npm ci
    Set-Location ..\..
  2. Step 2: Start the stack

    Aspire starts Postgres, Redis, Keycloak, the fake LLM, the gateway and the admin UI. Demo data is on by default.

    PowerShell
    .\scripts\Start-Dev.ps1          # with demo data
    .\scripts\Start-Dev.ps1 -Empty   # empty database, only login users

    Prefer Visual Studio? Open UmeLlmGateway.slnx, set Ume.LlmGateway.AppHost as the startup project and press F5.

  3. Step 3: Sign in and create a key

    Open https://localhost:5173 and sign in as the gateway-admin test user (the password is the dev-user-password secret in the AppHost user secrets). Under Keys, choose New key. The secret is shown once, so copy it now.

    The “Copy your secret now” dialog after creating a keyThe “Copy your secret now” dialog after creating a keyThe “Copy your secret now” dialog after creating a key
  4. Step 4: Send your first request

    Use the key with any OpenAI-compatible client. The fake LLM answers instantly.

    bash
    curl https://localhost:7212/v1/chat/completions \
      -H "Authorization: Bearer $UME_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"model":"ume/chat-standard","messages":[{"role":"user","content":"Hej"}]}'

Connect an application

Applications need two things from an administrator: a key from their team and the gateway's base URL (https://<gateway>/v1). Read the key from an environment variable such as UME_API_KEY; never store it in code. Ask for an alias from the admin UI's Catalogue, such as ume/chat-standard, rather than a vendor model. The gateway publishes its OpenAPI document at /openapi/v1.json and an API reference at /scalar.

Prompts and responses are never saved by the gateway. Don't send confidential information to external providers without an approved assessment.

Common errors

Errors use the OpenAI error shape with a stable code. To investigate a failed call, find it by request ID under Monitor › Usage › Requests and costs in the admin UI.

CodeMeaning
invalid_api_keyThe key is missing or unknown.
key_expiredThe key has passed its expiry date.
key_revokedThe key was revoked, or its rotation grace period ended.
key_disabledThe key, its team or its department is disabled.
address_not_allowedThe key may not be used from this client address.
model_not_allowedThe key may not use this model or alias.
model_not_foundNo alias or model has this name.
model_ambiguousSeveral providers have a model with this name; use provider/model or an alias.
budget_exceededA key, team or department budget has run out.
rate_limitedToo many requests or tokens per minute for this key.
pii_blockedPersonal data was found and the key's PII policy is Block.
attachment_not_allowedThe key's Attached files setting does not allow this kind of file.
request_too_largeThe body is larger than the gateway accepts.
no_eligible_providerNo provider is allowed for this key, residency and model.
all_providers_failedEvery provider and fallback failed or timed out.
invalid_requestThe request body is not valid for this endpoint.

Terms

Key
A secret that identifies an application and controls its access, limits and budget.
Alias
A model name such as ume/chat-standard that the gateway maps to one or more provider models.
Fallback
The next provider tried when a call fails before the response starts.
Budget
The most an owner may spend during a calendar period.
Residency
Where a provider runs: on-prem, EU or external. A key lists the residencies it may use.
Routing rule
A condition on the request, such as a header or how much of the budget is left, that sends it to a different model. The x-ume-rule response header shows which rule applied.