EN ▾
Unrestricted Search

Uncensored LLM API for developers

Unrestricted SearchGet API key

Open WebUI REST API: Connect an Uncensored LLM Backend

Open WebUI can talk to any OpenAI-compatible endpoint, and it also exposes a REST API of its own. This page covers both, with the exact settings to point it at an uncensored text model.

Updated

Browser-style chat interface connected by a cable to a model server stack

Key points

  • Open WebUI connects to this API through its OpenAI connection: base URL, key, done.
  • Verify the key and model list with curl before touching the UI.
  • Streaming works out of the box; JSON mode and tools are request parameters you set per call.
  • Eight concurrent requests per full key is the number to plan around for shared instances.

Which Open WebUI REST API do you mean?

People who search for the open webui rest api usually mean one of two things, and the answer differs for each. The first is the connection Open WebUI makes outward: it sends chat requests to a model provider over a REST API that follows the OpenAI format. The second is the API Open WebUI exposes itself, so your scripts can chat through your own instance. This article handles the first in depth and then covers the second briefly.

For the outward connection, you need three values from us: the base URL https://api.unrestrictedsearch.top/v1, an API key, and the model ID uncensored. The service implements POST /v1/chat/completions and GET /v1/models, which is exactly what Open WebUI calls. If you have no key yet, the API key page walks through sign-up, and new accounts can claim $0.50 of trial credit with one click, no card needed.

One thing to settle early: this is a text model only. It generates chat replies. It does not make images, audio or video, and it does not produce embeddings. Open WebUI has features that depend on those, so a later section lists what to leave on other providers.

Add the connection in the Open WebUI settings

Open WebUI stores provider connections in the admin settings. Menu names shift a little between releases, so treat the labels below as a guide.

  1. Sign in as an admin and open Admin Settings, then Connections.
  2. Under the OpenAI API section, add a new connection.
  3. Set the URL to https://api.unrestrictedsearch.top/v1. Keep the /v1 suffix.
  4. Paste your key into the key field. It is sent as Authorization: Bearer <key>.
  5. Save, and use the verify button if your version shows one.

Open a new chat and open the model picker. You should see uncensored. If the list is empty, the usual causes are a missing /v1, a trailing space in the key, or a key without credit. The next sections show how to tell which.

Docker environment variables

If you prefer configuration as code, Open WebUI reads the connection from environment variables at startup. These are the ones its OpenAI integration documents:

docker run -d -p 3000:8080 \
  -e OPENAI_API_BASE_URL="https://api.unrestrictedsearch.top/v1" \
  -e OPENAI_API_KEY="YOUR_KEY" \
  -v open-webui:/app/backend/data \
  --name open-webui \
  ghcr.io/open-webui/open-webui:main

Some releases treat these variables as first-run defaults and then prefer whatever is saved in the database, so if you change the key later, change it in the admin panel too.

Check the endpoint with curl first

Before blaming the interface, test the API directly. Two requests tell you nearly everything. The first lists models and confirms the key:

curl -sS https://api.unrestrictedsearch.top/v1/models \
  -H "Authorization: Bearer YOUR_KEY"

A healthy response is JSON containing a model entry with the ID uncensored. The second sends a real chat request:

curl -sS https://api.unrestrictedsearch.top/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"}],
    "max_tokens": 10
  }'

If both work from the machine that runs Open WebUI, the connection fields are the problem, not the API. If they fail only inside the container, check that the container can reach the internet and that DNS works there. An authentication error means the key is wrong or has not been pasted completely. The full request reference is in the API documentation.

Streaming in the chat window

Open WebUI streams replies by default. Under the hood it sets stream: true, and the API answers with server-sent events, one small chunk per token group, with usage reported at the end. You do not configure anything on our side.

Two practical effects matter. First, a streamed request holds its concurrency slot until the last chunk arrives, so a long reply that the user is still reading on screen keeps one of your 8 slots busy. Second, if a browser tab is closed mid-reply, the slot frees when the stream ends or is dropped, not at the moment of the click. For a single user this never shows up. For a team sharing a key it can.

If streaming looks broken, with the reply appearing all at once, the cause is almost always a reverse proxy buffering the response. Disable proxy buffering for the Open WebUI route (in nginx, proxy_buffering off) and test again.

JSON mode and tool calling

Both features are parameters on the request, which means that how you reach them depends on if you are in the chat UI or calling the API from code.

JSON mode

The API accepts response_format: {"type":"json_object"}. The chat window does not have a toggle for it in every release, so the simplest route is to call the API directly (or through your own Open WebUI endpoint, shown below) when you need strict JSON. Tell the model in the prompt that you want JSON as well; the parameter constrains the output, but a clear instruction produces better field names.

curl -sS https://api.unrestrictedsearch.top/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "response_format": {"type": "json_object"},
    "messages": [
      {"role": "user", "content": "Return JSON with keys title and tags for a note about home networking."}
    ]
  }'

Tool calling

The API supports tools, tool_choice, streamed tool_calls and tool results sent back as role: "tool" messages. Open WebUI has its own tool and function system, with a setting that chooses between its built-in prompting approach and native function calling in the model's advanced parameters. If your version offers the native option, it passes tool definitions to the API in the standard format, and this endpoint handles them. Start with one simple tool, such as a clock or a calculator, and confirm the round trip before adding more.

Sharing one key across a team

A single Open WebUI instance often serves several people, and every chat they start uses the one upstream key. That is convenient and has a catch: the limits belong to the key, not to the user. With a full key, 8 requests can run at once. Ten colleagues asking questions in the same minute will see some requests answered with HTTP 429 and the code concurrency.

You have a few sensible options. Keep the group small enough that overlap is rare. Ask people to avoid running several long generations in parallel. Or run two Open WebUI connections with two keys and split the users between them. Whichever you pick, watch the X-Balance-USD header in a test call now and then so a low balance does not surprise the whole team at once.

Calling Open WebUI's own REST API

The second meaning of the query: Open WebUI serves an OpenAI-style chat endpoint under its own address, so scripts can reuse your configured connections. You create an API key in your Open WebUI account settings, then call your instance, not ours:

curl -sS http://localhost:3000/api/chat/completions \
  -H "Authorization: Bearer YOUR_OPEN_WEBUI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Say hello in five words."}]
  }'

That key belongs to Open WebUI and is separate from the API key you paste into the connection. Endpoint paths and permissions differ between versions, so check the documentation for the release you run. The benefit of this route is that the upstream key stays on the server and each script gets its own revocable key.

The cost is that every call still bills against the same upstream balance. Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, pay as you go from prepaid credit, and the pricing page lists the top-up amounts and bonuses.

Features to keep on other providers

Open WebUI bundles more than chat, and some features call endpoints this service does not offer.

  • Document search and RAG: needs an embedding model. Use Open WebUI's built-in local embedding option or another provider for that step, and send only the retrieved text to uncensored as chat context.
  • Image generation: not available here. Connect a separate image provider if you want it.
  • Voice input and output: also separate from this text endpoint.

The context window is 100,000 tokens for prompt plus completion, which leaves room for long conversations and pasted documents. The max request body is 8 MB. Failed or refused requests are not charged, and prompts are not used for training.

For anything beyond a personal instance, such as retries, key rotation and monitoring, the production checklist is worth reading before you share the instance with a team.

Fixing common errors

SymptomLikely causeFix
Empty model listWrong URL or missing /v1Use the exact base URL shown above and re-verify
Auth error on every requestKey truncated or has stray whitespacePaste it again; test the same key with curl
HTTP 429, code concurrencyMore than 8 simultaneous requestsLimit users or queue requests
HTTP 429, code rate_limitedMore than 300 requests per minuteSlow down or back off
429 with Retry-After: 5Temporary overloadWait the 5 seconds, then retry
Reply appears all at onceProxy bufferingTurn buffering off for the route

Trial keys are tighter: 2 concurrent requests and 60 requests per minute. If a trial key works for one chat but fails when two browser tabs generate at once, that is the limit, not a fault. The response headers include X-Balance-USD and the rate-limit values, which helps when you are debugging from curl with -i.

Questions and answers

Do I need to host anything to use this with Open WebUI?

You host Open WebUI itself, usually in Docker. The model runs on our side, so there is no GPU to manage; Open WebUI only needs the base URL and your key.

Why does the model list show only one entry?

The API serves a single model, with the ID <code>uncensored</code>. Open WebUI fills its model picker from GET /v1/models, so one entry is the expected result.

Can Open WebUI use this API for embeddings or image generation?

No. The service is text only, so chat is the only thing it covers. Keep document embeddings and images on other providers or on Open WebUI's local defaults.

What happens if several people share one Open WebUI instance?

All their chats use the same key and share its limit of 8 concurrent requests and 300 requests per minute. Past that you get HTTP 429, and a streamed reply holds its slot until it finishes.

Your key is one form away

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

Get API keyRead the docs