EN ▾
Get API key

Open WebUI API Documentation: Connect Our Endpoint

This is a practical open webui api documentation page for one task: using this API as the model backend behind Open WebUI. It lists the exact values, the two ways to set them and the fixes for the usual errors.

Updated

Glass chat window connected by a glowing cable to a server cube, showing a web interface linked to an API backend

Key points

  1. Open WebUI connects to any OpenAI-compatible server through Admin Settings, Connections.
  2. Use the base URL https://api.nsfwvideo.cc/v1, your API key and the model ID uncensored.
  3. Environment variables work for the first start; after that, settings saved in the interface take priority.
  4. All users of one Open WebUI instance share one key, and therefore its limits of 8 concurrent requests and 300 per minute.

The values you need

Open WebUI is a self-hosted chat interface. It does not ship its own language model; it talks to whatever backends you register. Searching for open webui api documentation usually leads to long reference pages for its internals, so here is only what you need to attach this API.

SettingValue
API base URLhttps://api.nsfwvideo.cc/v1
API keyYour key from the key page
Model IDuncensored
Auth headerAuthorization: Bearer <key> (sent by Open WebUI for you)
Endpoints usedGET /v1/models, POST /v1/chat/completions

The base URL ends in /v1 and has no trailing path after it. Open WebUI appends /models and /chat/completions itself. A frequent mistake is pasting the full completions URL into the field, which makes every call fail with a not found error.

Because this service is OpenAI-compatible, Open WebUI needs no plugin or special adapter. The same steps work for any version that has an OpenAI connection type, though labels move around between releases, so match the idea and not the exact wording.

Method 1: add a connection in the admin panel

  1. Sign in to Open WebUI with an admin account and open Admin Settings, then Connections.
  2. In the OpenAI API section, add a new connection with the plus button.
  3. Enter the URL https://api.nsfwvideo.cc/v1 and paste your key.
  4. Save. Open WebUI calls GET /v1/models to verify the connection and read the model list.
  5. Open a new chat and pick uncensored from the model selector.

If the verify button reports success, you are done. This API exposes exactly one model, so the selector will show a single entry. That is expected, and you shape the behavior with system prompts and sampling settings, not with a different model.

New users can claim $0.50 of trial credit with one click on the key page after sign-up. It lasts 7 days and needs no payment details. A trial key allows 2 concurrent requests and 60 per minute, so for a single person chatting it is plenty.

Method 2: Docker with environment variables

If you start Open WebUI from a command line or a compose file, you can pass the connection in as environment variables. The names below are the ones Open WebUI documents for its OpenAI connection.

docker run -d -p 3000:8080 \
  -e OPENAI_API_BASE_URL=https://api.nsfwvideo.cc/v1 \
  -e OPENAI_API_KEY=$API_KEY \
  -v open-webui:/app/backend/data \
  --name open-webui \
  ghcr.io/open-webui/open-webui:main

The same thing as a compose file, keeping the key in an .env file next to it:

services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    ports:
      - "3000:8080"
    environment:
      - OPENAI_API_BASE_URL=https://api.nsfwvideo.cc/v1
      - OPENAI_API_KEY=${API_KEY}
    volumes:
      - open-webui:/app/backend/data

volumes:
  open-webui:

Two details trip people up. First, Open WebUI stores many settings in its database after the first launch, so changing an environment variable later may appear to do nothing; change the value in Admin Settings instead, or reset the stored config. Second, to register several backends at once there are plural variables (OPENAI_API_BASE_URLS and OPENAI_API_KEYS) that take semicolon-separated lists. Check the project's current documentation for the exact behavior of your version.

Since the endpoint is a public HTTPS address, Docker networking needs no special flags. You do not need host.docker.internal or host networking as you would for a model server running on your own machine.

Check the connection outside the UI

When something fails, test the API directly. It removes Open WebUI from the equation and tells you whether the problem is the key, the URL or the interface.

# 1. does the key work and what models exist
curl -s https://api.nsfwvideo.cc/v1/models -H "Authorization: Bearer $API_KEY"

# 2. one chat completion
curl -i https://api.nsfwvideo.cc/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."}],"max_tokens":10}'

The response headers include X-Request-Id, X-Balance-USD and the rate limit headers. Keep the request ID if you ever contact support about a failed call; the quickstart shows the full request format. If curl works and Open WebUI does not, the problem is in the Open WebUI configuration, not the key.

Settings that matter after it connects

System prompt and model preset

In Open WebUI's workspace area you can create a custom model preset on top of uncensored with its own system prompt, temperature and other parameters. This is the right place for a persona or a writing style. Parameters such as temperature, top_p, stop, seed and the penalties are passed through by the API, so they take effect.

Background tasks cost tokens too

Open WebUI can send extra requests behind the scenes, for example to write chat titles or tags, and these arrive as normal API calls. With one model on this API, they use the same model and the same balance. If you see more requests than messages in your chat, look at the interface settings for title and tag generation and switch off what you do not need.

Context length

The model has a 100,000-token window that covers prompt plus reply. Open WebUI resends the visible conversation on each turn, so very long chats get slower and cost more per message. Start a new chat when the topic changes. For a video team using text for scripts and shot lists, one chat per script keeps both quality and cost sensible. This service handles text only, so video itself comes from other tools; see the video script API page for how text fits in a pipeline.

Running it for more than one person

A small team can share one Open WebUI instance, and each member gets a personal account inside it. Behind the scenes every request still uses the single connection you saved, so the service sees one key. That has three consequences.

  • Limits are shared. Eight people streaming at the same moment fill the 8 concurrency slots of a full key, and the ninth sees a 429 with the code concurrency. Stagger heavy jobs or ask people to wait a few seconds.
  • Spend is shared. The balance falls for the whole group. The X-Balance-USD header on responses lets you watch it, and a top-up from $20 up keeps the balance topped without a subscription.
  • Presets are shared. A custom model preset with a system prompt can be offered to everyone, so a script-writing preset behaves the same for the whole team.

If you need a hard boundary between groups, run two Open WebUI instances with two keys. Updating is a normal container update: pull the new image, restart, and keep the data volume so the stored connection survives.

Troubleshooting table

SymptomLikely causeFix
Verify fails, 401Wrong or missing keyPaste the key again without spaces; test with curl
Verify fails, 404URL includes extra pathUse the base ending in /v1 only
No model in the selectorConnection saved but disabled, or model filter setEnable the connection; clear any model ID filter
Intermittent 429Too many parallel requests or per-minute limitReduce simultaneous chats; wait and retry
429 with Retry-After 5Temporary overloadRetry after five seconds
Env var change ignoredValue already stored in the databaseEdit in Admin Settings
Replies stop abruptlyA low max tokens presetRaise it or leave it unset

A 429 can have the error code rate_limited (requests per minute) or concurrency (too many at once). A streamed reply holds its concurrency slot until the stream ends, so several people streaming from one instance count against the 8 slots of a full key.

Billing, limits and next steps

Everything bills through your single API key. Input costs $0.15 per 1M tokens and output $0.50 per 1M. A chat turn with 4,000 input tokens and 600 output tokens costs 4,000 x $0.15 / 1M = $0.0006 plus 600 x $0.50 / 1M = $0.0003, which is $0.0009. Failed or refused requests are not charged, credit does not expire, and prompts are not used for training. Top-ups run from $20 to $500 with a 5% bonus from $50, 10% from $100 and 15% from $200; crypto is the payment method here, in USDT on TRC20 or USDC on Base. See the pricing page for the details.

The content rule is the same everywhere: the model is tuned to answer without content refusals for lawful adult use, and sexual content involving minors is never allowed.

Questions and answers

What base URL do I put into Open WebUI?

Use https://api.nsfwvideo.cc/v1 with your API key. Open WebUI adds the models and chat completions paths itself.

Which model name should I choose?

There is one model, with the ID uncensored. It appears in the selector after the connection is verified.

Why is my environment variable ignored?

Open WebUI keeps many settings in its database after the first start. Change the connection in Admin Settings, or reset the stored configuration.

Can several people share one connection?

Yes, but they share one key and its limits of 8 concurrent requests and 300 requests per minute on a full key.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key