EN ▾

Uncensored API for developers.

Get API key

Open WebUI with OpenRouter: Use This API Instead

If you run open webui with openrouter today and want a model that does not refuse lawful adult requests, the same connection screen works for this API. You change the URL, paste a key and pick the model.

Updated

Isometric illustration of a chat window connected by a glowing cable to a hosted API server

The short version

Open WebUI is a self-hosted chat front end. Its Connections settings accept any server that speaks the OpenAI chat completions protocol. OpenRouter is one such server. This API is another, so the steps are the same ones you used for OpenRouter, with different values.

  1. Open the admin settings and go to Connections.
  2. Add an OpenAI connection.
  3. Set the URL to https://api.openrouternsfw.cc/v1.
  4. Paste your API key.
  5. Save, then pick uncensored from the model list in a new chat.

Menu names move around between Open WebUI releases, so treat the labels above as a guide. If you do not have a key yet, create one here. New users can claim $0.50 of trial credit with one click after sign-up, no payment details needed.

Test the key before you touch Open WebUI

A surprising share of connection problems are not Open WebUI problems. They are a wrong key, a typo in the URL or an empty balance. Spend thirty seconds on curl first, so you know the API itself answers.

curl https://api.openrouternsfw.cc/v1/models   -H "Authorization: Bearer YOUR_KEY"

You should get a JSON list that includes uncensored. Now send one chat request:

curl https://api.openrouternsfw.cc/v1/chat/completions   -H "Authorization: Bearer YOUR_KEY"   -H "Content-Type: application/json"   -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Reply with the single word ready."}]
  }'

If both calls work, the API side is fine and anything that fails later is a setting in Open WebUI. The response headers also show X-Balance-USD, which is a quick way to confirm there is credit on the key.

Install Open WebUI with Docker

Skip this section if your instance already runs. For a fresh install, Docker is the shortest route.

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) and you are in. The volume keeps your chats and settings when you update the container.

Pre-set the connection with environment variables

Open WebUI can read the connection from the environment, which is handy for scripted deployments. Add these two flags to the same docker run command:

  -e OPENAI_API_BASE_URL="https://api.openrouternsfw.cc/v1"   -e OPENAI_API_KEY="YOUR_KEY" 

Environment values are typically used on first start and later edited in the admin screen, so if you change the key afterwards, change it in the UI as well. Never bake a real key into an image you share.

Add the connection in the admin panel

Sign in as the admin, open the admin settings and look for Connections. You will see a list of OpenAI-style connections, usually with one default entry for the official OpenAI URL. You have two options: edit that entry or add a new one. A new one is safer if you also use another provider.

FieldValue
URLhttps://api.openrouternsfw.cc/v1
API keyYour key from the dashboard
Model IDs (if asked)uncensored

Use the verify button next to the fields if your version has one. It calls the models endpoint, which is why the earlier curl test is a good predictor. When the check passes, save.

Open a new chat, click the model selector and choose uncensored. There is only one model on this service, so the list is short. If the selector stays empty, add the model ID by hand in the connection's model list, or reload the page after saving.

Settings worth changing for chat

The defaults are fine for a first message, but a few settings change the experience.

System prompt

Open WebUI lets you set a system prompt per chat or per saved model preset. For roleplay or fiction, put the persona and scene rules there. For adult-oriented use, also state the rule you want enforced, for example that no minors appear in any scenario. The service itself forbids sexual content involving minors, and repeating the rule in your own prompt keeps your instance consistent.

Advanced parameters

Temperature, top_p, stop sequences, seed and the frequency and presence penalties are passed through to the model. A temperature around 0.8 to 1.0 suits creative writing. Lower it to 0.2 or 0.3 for factual work. A seed makes two runs comparable when you test a prompt.

Max tokens and context

The context window is 100,000 tokens for prompt and completion together. You do not have to set max_tokens, because the completion can use the rest of the window. If you want short answers, set it explicitly. Remember that each new message resends the chat history as input, and input tokens are billed at $0.15 per 1M.

Background requests

Open WebUI can make extra model calls in the background, for example to generate a chat title or follow-up suggestions. Those calls use your key and count toward the request limits. If you see more traffic than expected, look at the interface settings and turn off the extras you do not need.

What a day of chat costs

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, billed from prepaid credit with no subscription. A short chat message with a 3,000-token history and a 300-token reply costs 3,000 x $0.15 / 1M = $0.00045 for input plus 300 x $0.50 / 1M = $0.00015 for output, so $0.0006. One hundred such messages cost $0.06.

A long roleplay chat is different. With 40,000 tokens of history and a 500-token reply, one message costs $0.006 + $0.00025 = $0.00625, and fifty messages cost $0.3125. That is the reason to trim history on long chats: the price per message grows with the history, not with the reply.

The pricing page has top-up amounts, from $20 to $500 with bonuses from $50 up. Payment is in crypto, either USDT on TRC20 or USDC on Base. Failed or refused requests are not charged, and credit does not expire.

Fixing common errors

The model list is empty or the verify check fails. Check that the URL ends in /v1 and has no trailing path such as /chat/completions. If Open WebUI runs in Docker and you test from the host, remember that the container needs outbound internet access.

401 or an authentication error. The key is missing, copied with a space, or revoked. Paste it again and re-run the curl test.

429 with code rate_limited. You went over the requests-per-minute limit. A full key allows 300 per minute, a trial key 60.

429 with code concurrency. Too many requests at once. A full key allows 8 at a time and a trial key 2. This shows up when several people share one instance, because every open streaming response holds a slot until it ends. It also appears if background title generation runs next to a long reply on a trial key.

429 with a Retry-After header. The service is temporarily overloaded. Wait the 5 seconds from the header and send the request again.

For the full parameter list and error format, the API docs are the reference.

Is it a replacement for OpenRouter?

Not exactly, and it helps to be clear about the difference. OpenRouter is a router that exposes many models from many providers behind one key. This service is one open-weight text model, run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not an official API of any model maker and it does not route between vendors.

So the sensible setup in Open WebUI is to keep your existing connection for general models and add this one beside it. Open WebUI lists models from all connections in the same selector, and you switch per chat. Prompts sent to this API are not used for training.

Questions and answers

Can I use this API and OpenRouter in the same Open WebUI?

Yes. Add a second OpenAI-type connection and both sets of models appear in the selector. You choose per chat.

What URL do I enter in Open WebUI?

Use https://api.openrouternsfw.cc/v1 and your API key. The model ID is uncensored.

Why does Open WebUI show no models after I save?

Usually the URL is missing /v1 or the key is wrong. Run curl against /v1/models first, then add the model ID by hand if the list stays empty.

Does it work with a trial key?

Yes, but a trial key allows only 2 concurrent requests and 60 requests per minute, so keep Open WebUI's background features light.

Are chats used for training?

No. Prompts sent to the API are not used for training.

Your key is one form away

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

Key points

  • Open WebUI talks to any OpenAI-compatible server, so no plugin is needed.
  • Use base URL https://api.openrouternsfw.cc/v1, an Authorization bearer key, and the model ID uncensored.
  • Test the key with curl first; most failures are a missing /v1 or a key with no credit.
  • Keep an eye on the 8-request concurrency limit when several people share one key.