Open WebUI Setup with an OpenAI-Compatible API
Open WebUI is a self-hosted chat interface. Give it one FreeModel connection and your whole team gets a private chat app on top of the models in your plan.
Open WebUI is an open-source, self-hosted web interface for chatting with language models. It runs on your machine or server, keeps chat history in its own database, and supports several users. For models it can use any OpenAI-compatible API, so a single FreeModel connection gives it every model your plan covers.
There are two ways to add the connection. Pick one.
Path A or path B?
| Path A: admin settings | Path B: environment variables | |
|---|---|---|
| Where | In the Open WebUI interface | In docker run or your compose file |
| Best for | An instance that is already running | New installs, reproducible deployments |
| Change later | Edit in the interface | Edit and restart the container |
Either way you need three values: the URL https://freemodel.in/v1, a FreeModel key from Dashboard → API Keys, and at least one model id you are allowed to use. On the free plan that means a free model such as gpt-6-luna.
Path A: add a connection in admin settings
- Sign in to Open WebUI as an admin.
- Open the admin panel and go to its settings for connections.
- Under the OpenAI API connections, add a new connection.
- URL:
https://freemodel.in/v1 - Key: your
fm_key. - Save. Open WebUI calls
GET /v1/modelsand the FreeModel ids appear in the model selector of a new chat.
If your Open WebUI version offers a list of allowed model ids on the connection, you can enter only the models you want users to see. That keeps a free key from offering premium models that would fail.
Path B: Docker environment variables
Open WebUI reads OPENAI_API_BASE_URL and OPENAI_API_KEY at start-up:
docker run -d -p 3000:8080 \
-e OPENAI_API_BASE_URL=https://freemodel.in/v1 \
-e OPENAI_API_KEY=fm_your_key_here \
-v open-webui:/app/backend/data \
--name open-webui \
ghcr.io/open-webui/open-webui:main
Then open http://localhost:3000 and create the first (admin) account. With Docker Compose, put the same two variables under environment:, ideally reading the key from an .env file that is not committed.
Note: Open WebUI stores settings in its database after the first start. If you later change a variable and nothing happens, the value saved in the admin settings is probably taking precedence; edit it there.
Check the connection outside Open WebUI
If no models appear, test the same values from the machine running the container:
curl https://freemodel.in/v1/models \
-H "Authorization: Bearer fm_your_key_here"
A JSON list means the key and URL are fine, and the issue is in Open WebUI's settings or the container's network. No answer at all usually means the container cannot reach the internet.
One key per instance
Create a separate FreeModel key just for Open WebUI. Usage is then easy to tell apart from your other tools, and if the server is ever exposed or the key leaks, you can revoke that one key in Dashboard → API Keys without breaking anything else. Keys are shown only once, so paste it straight into the connection or your .env file.
What to know about the model list
- Free keys only work on free models. The free models are GPT-6.2 Astra, GPT-6 Luna, Grok 4.6, Grok 4.7, Claude Haiku 5.5, GLM-5.3 Flash, Qwen 3.8 Omni Flash and DeepSeek V4.1 Flash 1017. The other Claude models, GPT-6 Astra, Gemini and the other premium models answer
403 upgrade_requiredon a free key. - Ids are exact. FreeModel only serves listed models and does not map names like
gpt-4oto a different model. - Images need Vision. If users attach images, pick a model with the Vision capability. Capabilities are on the models page; for example GPT-6 Luna has Vision.
Costs in a shared instance
The connection is set by the admin, so every chat from every user is billed to that one key. A few things help:
- Background requests count. Open WebUI can ask a model to write chat titles, tags and suggestions. Those requests use the same connection. If your version lets you pick a separate model for these tasks, choose a free or cheap one.
- Long chats cost more per message. Each message resends the conversation. Input and output tokens both count.
- Multipliers apply. Each model uses plan tokens at its own rate; Claude Opus and Sonnet are 3×, GPT-6 Astra and Sol are 1.75×. The full table is on the pricing page.
- Rate limits are per account. All users share the account's per-minute limit (and any lower limit you set on the key): 30 requests on the free plan, 120 on Starter, up to 1,500 on Ultra.
Plans are prepaid for 30 days with no auto-renew, and unused tokens can be refunded at any time (see refunds).
Errors and fixes
| Error | Meaning | Fix |
|---|---|---|
| 401 | Bad or revoked key | Paste the key again |
| 402 | Tokens used up (tokens_exhausted) | Wait for the monthly reset or choose a plan; nothing is charged for the rejection |
403 upgrade_required | Paid model on a free key | Use a free model or upgrade |
| 404 | Wrong URL or unknown model id | URL must end at /v1; use ids from /v1/models |
| 429 | Requests-per-minute limit (account or key) | Wait; fewer users per account |
| 503 | Model temporarily unavailable | Try later or switch model |
Prefer a different self-hosted interface? See the LibreChat guide.
FAQ
Why do some models in the list fail on my free key?
The list shows the catalogue, but free keys work only on the free models. Premium models such as Claude Opus and Sonnet answer 403 upgrade_required until you have a paid plan; Claude Haiku 5.5 is on the free plan.
Do all Open WebUI users share my key?
Yes. The connection is set by the admin, so every chat from every user is billed to that key. Limit which models users can see if that matters.
Why does my usage show requests I did not make?
Open WebUI sends background requests, for example to write chat titles and tags. They use the same connection and count as tokens.
Should the URL end in /v1?
Yes. Use https://freemodel.in/v1 exactly. Open WebUI adds /models and /chat/completions itself.
Grab a free API key — 1M tokens on 8 free models after a one-time Telegram verification, no card. Every model from $1.20.