What you are setting up
If you landed here by typing openwebui how to chat n8n, you are probably trying to do two related things: talk to a model in Open WebUI, and call the same model from n8n workflows. Both tools can point at any server that follows the OpenAI chat completions format, so one account covers both.
Open WebUI is a self-hosted chat interface. n8n is a workflow automation tool where you wire nodes together. The API behind them is the same in each case:
- Base URL:
https://api.nofilteraichat.com/v1 - Model ID:
uncensored - Auth: an
Authorization: Bearerheader carrying your key
You need a key first. The API key page walks through sign-up and the one-click $0.50 trial credit, which is enough to test everything below.
Part one: Open WebUI
Option A: the admin panel
If Open WebUI is already running, sign in as an admin and open the Admin Settings, then Connections. Add a new OpenAI API connection with these values:
- URL:
https://api.nofilteraichat.com/v1 - Key: your API key
- Save, then use the verify button if your version has one.
Menu names shift a little between releases, so look for the section that lists OpenAI-style connections. After saving, start a new chat and open the model picker. The model uncensored should appear, because Open WebUI loads the list from GET /v1/models.
Option B: environment variables in Docker
If you are starting fresh, pass the settings when you launch the container:
docker run -d --name open-webui -p 3000:8080 \
-e OPENAI_API_BASE_URL="https://api.nofilteraichat.com/v1" \
-e OPENAI_API_KEY="$NOFILTER_API_KEY" \
-v open-webui:/app/backend/data \
ghcr.io/open-webui/open-webui:mainOpen http://localhost:3000, create the first local account, and the model will be waiting in the picker. Note that Open WebUI stores connection settings in its database after first launch. If you change the variables later and nothing happens, edit the connection in the admin panel instead.
Tuning a chat
In the chat controls you can set temperature, top_p, a stop sequence and a system prompt. These pass through to the model. For fiction and roleplay, a temperature between 0.7 and 1.0 gives livelier prose. For factual questions, go lower. If the model starts repeating phrases, raise the frequency penalty a little.
Part two: n8n with the OpenAI node
n8n has a native OpenAI credential. Its configuration includes a Base URL field, which defaults to the official server. Change it and the node talks to your endpoint:
- In n8n, create a new credential of type OpenAI.
- Paste your API key.
- Set the Base URL to
https://api.nofilteraichat.com/v1. - Save and attach the credential to an OpenAI Chat Model node or an AI Agent workflow.
The catch is the model field. Some nodes show a dropdown filled from the models list, and some limit the choices to known names. If you cannot select uncensored, switch the field to expression mode and type the ID by hand. If your n8n version still refuses it, use the HTTP Request approach in the next section, which has no such restriction.
With the credential working, you can attach the chat model to an AI Agent node and give it tools. Tool calling is supported by the API (tools, tool_choice, and results as role: "tool"). As with any open-weight model, test the agent on real inputs and keep tool descriptions short and literal.
Part three: chat from an HTTP Request node
The most predictable option is a plain HTTP Request node. It shows exactly what is sent, and it works in every n8n version. Configure the node like this:
- Method: POST
- URL:
https://api.nofilteraichat.com/v1/chat/completions - Authentication: Header Auth, with name
Authorizationand valueBearer YOUR_KEY(store it as a credential, not in the node) - Send Body: on, content type JSON
Set the body to the following, using an expression for the user text:
{
"model": "uncensored",
"messages": [
{ "role": "system", "content": "You are a concise story assistant for adult fiction writers." },
{ "role": "user", "content": "{{ $json.prompt }}" }
],
"temperature": 0.8,
"max_tokens": 600
}The reply text sits at choices[0].message.content. In the next node, read it with the expression {{ $json.choices[0].message.content }}. The same response also holds a usage block, so you can log token counts to a sheet or a database.
A typical workflow is a webhook trigger, this HTTP node, and a reply node that returns the text. Another common one reads rows from a spreadsheet, generates a draft for each, and writes the results back. You can also test the request outside n8n first with curl:
curl https://api.nofilteraichat.com/v1/chat/completions \
-H "Authorization: Bearer $NOFILTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"Say hello in five words."}]}'Limits, retries and batches in n8n
A full key allows 8 concurrent requests and 300 requests per minute; a trial key allows 2 and 60. n8n can easily break those numbers, because a node processes every incoming item and may fire them quickly.
In the HTTP Request node, open Options and use Batching: set a batch size of 4 or 6 and an interval of a second or two. Under the node Settings, turn on Retry On Fail with 3 tries and a wait of 5000 ms. That matches the API behaviour: when it is briefly overloaded it returns HTTP 429 with a Retry-After: 5 header. Other 429 codes tell you which limit you hit: rate_limited means too many requests per minute, concurrency means too many at once.
Streaming deserves a note. A streamed request keeps its concurrency slot until the stream ends. In n8n, leave streaming off in the HTTP node, since the workflow waits for the whole answer anyway. Open WebUI streams by default, which is right for a chat window.
Cost of a workflow
Suppose a workflow processes 500 rows, sending 800 input tokens and getting 250 output tokens for each. Input: 500 × 800 = 400,000 tokens, which costs 400,000 × $0.15 / 1,000,000 = $0.06. Output: 500 × 250 = 125,000 tokens, which costs 125,000 × $0.50 / 1,000,000 = $0.0625. The run totals $0.1225, about 12 cents. See the pricing page for top-ups.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Open WebUI shows no models | Wrong URL or key | Use the base URL ending in /v1; test GET /v1/models with curl |
| Docker env changes ignored | Settings already stored | Edit the connection in Admin Settings |
| 401 from n8n | Header value missing the word Bearer | Value must read Bearer, a space, then the key |
| Open WebUI in Docker cannot reach a local proxy | localhost points at the container | Use the host address, not localhost |
| 429 in the middle of a loop | Too many parallel items | Batch the HTTP node and enable retry |
| Model not found | Name typed wrongly | The only ID is uncensored |
Remember the product limits when you design a flow: text chat only, a 100,000 token window shared by prompt and reply, and an 8 MB request body. There is no embeddings endpoint, so keep any vector search on another service. The quickstart has the full request reference, and the integration guide covers more front ends. Prompts sent through the API are not used for training.
The hard rule applies in every tool: no sexual content involving minors. Within lawful adult use, the model is tuned to answer without content refusals, which suits fiction, roleplay and companion apps for adults.
