Open WebUI API Key: Generate One and Connect It
Two different keys are involved when you set up Open WebUI: the one you get from your API provider and the one Open WebUI can issue for itself. This guide covers both and connects a hosted uncensored model.

Key points
- The provider key goes into Admin Settings, Connections, OpenAI API, together with the base URL.
- The model list is read from GET /v1/models, so uncensored appears once the connection saves.
- Open WebUI can also issue its own personal API keys for scripts, a separate thing.
- A 3,000-token prompt with a 600-token reply costs $0.00075.
No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).
Get API keyTwo kinds of key: which one do you need?
When people search open webui api key generate, they usually mean one of two things, and mixing them up is the most common reason a setup stalls.
- A provider key. This is the secret you get from the service that runs the model. You paste it into Open WebUI so the interface can call that service. Without it, the chat window has no model to talk to.
- An Open WebUI key. Open WebUI can issue personal API keys for its own API, so that a script can talk to your Open WebUI instance instead of the browser doing it. Depending on the version and the admin settings, this option lives in your account settings and may need to be enabled by an administrator.
This article spends most of its time on the first: generating a key for the hosted API and wiring it in. The second is covered briefly near the end, because it answers the other half of the query.
Generate your key for the hosted API
The API behind this site is OpenAI-compatible, so any client that accepts a custom OpenAI endpoint works, and Open WebUI is one of them. It serves one open-weight model, tuned to answer without content refusals for lawful adult use, run by an independent provider. It is not an official API of a model vendor, and it covers text only.
To generate the key:
- Go to the API key page.
- Sign up with Google, or with an email address and a password.
- Create a key and copy it. Treat it like a password.
- Optional: use the one-click trial claim on the same page to get $0.50 of credit. It needs no card, is valid for 7 days and is limited to one per person.
You need two more values: the base URL https://api.unrestrictedvideogenerator.com/v1 and the model ID uncensored. Requests authenticate with an Authorization: Bearer header, which Open WebUI adds for you once the key is stored.
Add the connection in Open WebUI
If you do not run Open WebUI yet, the project documents a Docker install. The commonly used command looks like this:
docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main
Open http://localhost:3000, create the first account (it becomes the admin), then:
- Open the admin area and go to Settings, then Connections.
- In the OpenAI API section, add a new connection with the plus button.
- Set the URL to
https://api.unrestrictedvideogenerator.com/v1. - Paste your key into the key field.
- Save. Open WebUI verifies the connection and loads the model list.
- Start a new chat and choose
uncensoredfrom the model picker.
The model list comes from GET /v1/models, which this API implements, so you do not have to type a model name anywhere. If you prefer configuration through the environment, the same two values can be passed when the container starts:
docker run -d -p 3000:8080 -e OPENAI_API_BASE_URL="https://api.unrestrictedvideogenerator.com/v1" -e OPENAI_API_KEY="your-key-here" -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main
One detail to know: Open WebUI treats those environment variables as initial values. After the first start, the settings saved in the admin panel take over, so changes later are made in the interface rather than by editing the command.
Check the key outside the interface
When the model list stays empty, find out whether the key or the interface is at fault. Two curl calls settle it.
curl https://api.unrestrictedvideogenerator.com/v1/models -H "Authorization: Bearer $API_KEY"
curl https://api.unrestrictedvideogenerator.com/v1/chat/completions -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{"model":"uncensored","messages":[{"role":"user","content":"Reply with the word ready."}]}'
The first call should list the model, the second should return a chat completion. Look at the response headers while you are at it. X-Balance-USD shows what is left on the account, and X-Request-Id identifies the call if you need help from support.
If you run Open WebUI in Docker and the API is reachable from your host but not from the container, the container's network is the issue, not the key. This API is a public HTTPS address, so ordinary outbound access from the container is enough.
Using the key from code instead of the interface
Once the key works in Open WebUI, the same value works in any OpenAI-compatible library. A short Python check confirms the whole path and shows the usage numbers that Open WebUI hides:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.unrestrictedvideogenerator.com/v1",
api_key=os.environ["API_KEY"],
)
r = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Give me three names for a tavern."}],
)
print(r.choices[0].message.content)
print(r.usage.prompt_tokens, r.usage.completion_tokens)
Compare the token counts with the price per million to predict a bill. A call with 120 prompt tokens and 80 completion tokens costs 120 x $0.15 / 1M + 80 x $0.50 / 1M = $0.000018 + $0.00004 = $0.000058. Numbers this small explain why chat use rarely drains a balance quickly; the spend comes from long histories and automated loops, not from single questions.
Streaming, JSON mode and tool calling all work through the same endpoint. Open WebUI uses streaming by default for chat, so you will see text appear as it is generated.
Costs and limits you should know
Billing is prepaid and pay as you go: $0.15 per 1M input tokens and $0.50 per 1M output tokens. There is no subscription, failed or refused requests are not charged, and credit never expires.
A normal chat turn in Open WebUI sends the conversation so far plus your new message. Take a mid-length exchange with a 3,000-token prompt and a 600-token reply:
- Input: 3,000 x $0.15 / 1M = $0.00045
- Output: 600 x $0.50 / 1M = $0.0003
- Total: $0.00075
One hundred such messages cost $0.075, so the $0.50 trial lasts for about 666 of them. Long threads cost more per message because the history grows. At a 30,000-token prompt with the same 600-token reply, a message costs $0.0045 + $0.0003 = $0.0048. Start a fresh chat when the old context no longer matters.
When the trial runs out, add credit with any whole-dollar top-up from $20 to $500 in USDT on TRC20 or USDC on Base. The bonus is +5% from $50, +10% from $100 and +15% from $200. See the pricing page for details.
Rate limits
A full key allows 8 concurrent requests and 300 requests per minute; a trial key allows 2 and 60. For one person in a chat window that is generous. It matters if several people share a single Open WebUI instance and one key. Then a 429 with code concurrency means too many generations at once, and a 429 with code rate_limited means too many requests in a minute. Streaming replies keep their slot until they finish.
Generating an Open WebUI personal key for scripts
The other meaning of the query is a key for Open WebUI itself. In versions that offer it, you can find API keys in your account settings, generate one, and then call your own Open WebUI server from code. The server then forwards requests to whatever connection you configured, including the one above. An administrator may have to allow API key creation first, and the exact menu path can differ between releases, so check the Open WebUI documentation for your version.
This is useful when you want chat history, document uploads or access control from Open WebUI but still need to call it from a script. If you only need raw text generation from code, skip the middle layer and call the hosted endpoint directly with the openai package and the same base URL. The API documentation shows the request format, streaming, JSON mode and tool calling.
Whichever key you use, keep it out of repositories and shared screenshots, rotate it if it leaks, and give each tool its own key where the system allows it.
For a small team, the tidy setup is one provider key stored in the Open WebUI admin connection, with people signing in under their own Open WebUI accounts. Nobody else needs to see the provider key, and you can watch the shared balance through the X-Balance-USD header in a periodic script. Because everyone shares one key, the key's limits are shared too: 8 concurrent requests and 300 per minute for a full key.
More guides
Questions and answers
Where do I generate the key that Open WebUI needs?
Create it on the API key page of this site after signing up. Then paste it, with the base URL ending in /v1, into the OpenAI API connection in Open WebUI.
Which model name do I select?
Select uncensored. Open WebUI reads it from the /v1/models endpoint once the connection is saved.
Do I need to pay before testing?
No. New users can claim $0.50 of trial credit with one click on the key page. It needs no card and is valid for 7 days.
Is the trial key limited?
Yes: 2 concurrent requests and 60 requests per minute, against 8 and 300 for a full key.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.