Use Open WebUI with a private API

Connect Open WebUI to the private Morse API: set it up, pick a model, and check it works.

Open WebUI is a self-hosted chat app that you run in Docker or with pip, and open in your browser. It speaks the OpenAI API, so it works with Morse: give it the base URL https://inference.trymorse.ai/v1 and a Morse API key, and its requests run on Morse's private inference, where Morse keeps nothing and no provider learns who you are.

Before you start

In the console, open API keys and make a key for Open WebUI alone, with a spend limit, so a runaway session can't spend all your credits. See Limit a key.

You'll paste the key into Open WebUI's admin settings, or pass it to Open WebUI as it starts.

Set up Open WebUI

  1. Add Morse as a connection

    As an admin, open Admin Settings > Connections. Under Manage OpenAI API Connections, choose Add Connection. Set URL to https://inference.trymorse.ai/v1, paste your key in API Key, choose Verify Connection, then Save. Open WebUI lists every model Morse serves.

  2. Or add it as Open WebUI starts

    Pass the base URL and your key when you start Open WebUI for the first time. It keeps them in its database, where Admin Settings > Connections changes them after.

    Terminal
    docker run -d -p 3000:8080 -v open-webui:/app/backend/data \
      -e OPENAI_API_BASE_URL=https://inference.trymorse.ai/v1 \
      -e OPENAI_API_KEY="$MORSE_API_KEY" \
      --name open-webui --restart always ghcr.io/open-webui/open-webui:main
  3. Pick a model

    Start a new chat and choose moonshotai/kimi-k2.7-code, or any model from the table below, in the model menu at the top. To show only some of Morse's models, list their ids in the connection's Model IDs.

Which model to pick

ModelContextInput / outputWhy
moonshotai/kimi-k2.7-code262.1K$0.95 / $4Kimi's coding model. It doesn't reason, so it starts writing sooner.
moonshotai/kimi-k3.1-pro1M$2 / $10Reasons, and reads images.
z-ai/glm-5.31M$1.40 / $4.40Reasons, and takes tools at TEE too.
deepseek/deepseek-v4-pro-08131M$1.32 / $3.96Reasons, at a lower price.
z-ai/glm-5.3-flash1M$0.15 / $0.50Cheap and fast for small edits, and takes tools at TEE too.

Prices are in dollars per million tokens, on each model's default endpoint. Every model is on the models page.

Check it works

Verify Connection asks Morse for its models with your key, so a success there shows the URL and key are right. Then send a message in a new chat: the reply streams in from Morse.

Keep it private

A request runs on its model's default privacy tier. To hold Open WebUI to a tier, such as one where only attested hardware reads your prompts, set a privacy floor on its key. See Privacy tiers and Provider routing.

If something goes wrong

What you seeWhat to do
401The key is missing or wrong. Check that MORSE_API_KEY is set where Open WebUI starts, and that the key isn't revoked.
402Add credits, or raise the key's limit. Morse holds credit for a request's output limit before it starts. See Holds.
404Use a model's id exactly as the table above writes it, lab and all.

Every code is in Errors. For other tools, see Coding agents and editors.