Open WebUI Setup with AnonRouter
Connect a local Open WebUI instance to AnonRouter, discover models, and configure document retrieval.
Run Open WebUI locally using its quick start. Open WebUI connects to AnonRouter's hosted API for model responses.
Open WebUI connection settings
| Open WebUI setting | Value |
|---|---|
| Connection | OpenAI API |
| Connection Type | External |
| URL | https://api.anonrouter.ai/v1 |
| Auth | Bearer |
| API Key | An AnonRouter inference key beginning with ar_, with OpenAI-compatible access enabled |
| API Type | Chat Completions |
| Advanced → Model IDs | Optional allowlist of exact AnonRouter model IDs |
Use the /v1 base URL. Open WebUI appends /models while verifying the
connection and /chat/completions when chatting.
You need an AnonRouter account with available credits and an inference key with OpenAI-compatible access enabled.
Create an API keyConnect through the admin interface
- Sign in to Open WebUI as an administrator.
- Open Settings → Admin → Connections. Under Manage OpenAI API Connections, click Add Connection. On a fresh install, you can also edit the preconfigured connection using its gear icon.
- Enter the URL and paste your inference key into API Key.
- Confirm API Type displays Chat Completions. The control switches modes when clicked.
- Use Verify Connection, then save the connection. If the Connections page also shows a Save button, click it.
- Start a new chat, select an AnonRouter model, and send a plain text message.
Verify Connection checks AnonRouter's authenticated GET /v1/models
endpoint. Leave Model IDs empty to discover models automatically, or add
exact IDs to limit what appears in the picker.
To let AnonRouter select a model for chat, add /auto to Model IDs.
Private-RAG setup and limits
Open WebUI's Knowledge feature extracts files, splits them into chunks, embeds the chunks, and stores vectors for retrieval. When a chat uses a knowledge base, the relevant text is inserted into the model request.
For the smallest remote-data footprint:
- Keep Open WebUI's default local SentenceTransformers embedding engine, or configure another embedding service you control.
- Create a collection under Workspace → Knowledge and upload the files.
- Attach only the collection needed for the chat, or bind it to a dedicated model configuration.
- Review the retrieved citations and route privacy label before using sensitive material.
With local embeddings, document parsing, vector creation, and vector storage stay on your Open WebUI deployment. Open WebUI sends passages included in a prompt through AnonRouter to the selected model provider.
Use AnonRouter for embeddings
AnonRouter also exposes POST /v1/embeddings in compatibility mode. If you
choose OpenAI as Open WebUI's RAG embedding engine, use the same base URL and
a current embedding-model id from the model catalog. In environment-based
deployments, Open WebUI documents these settings:
RAG_EMBEDDING_ENGINE=openai
RAG_OPENAI_API_BASE_URL=https://api.anonrouter.ai/v1
RAG_OPENAI_API_KEY=ar_REPLACE_WITH_YOUR_API_KEY
RAG_EMBEDDING_MODEL=REPLACE_WITH_AN_EMBEDDING_MODEL_IDEmbedding this way sends document chunks to AnonRouter and the selected embedding provider. Use local embeddings if that is outside your privacy boundary. After changing embedding models, re-index existing documents so old and new vectors are not mixed.
Supported features and limits
| Feature | Status with AnonRouter |
|---|---|
| Model discovery | Supported through GET /v1/models |
| Chat Completions | Supported, streaming and non-streaming |
| Tool calling | Supported on tool-capable routes |
| Embeddings | Supported with an embedding model |
| Inline image input | Supported on vision-capable routes using Chat Completions image parts |
| Responses API | Use Chat Completions with AnonRouter |
| Legacy text completions | Not supported |
| OpenAI image or audio endpoints | Not exposed through compatibility mode |
Open WebUI can expose settings a selected route ignores or rejects. Start with plain text chat, confirm the connection, then enable tools or other features one at a time.
Use AnonRouter web search
These steps were tested in Open WebUI v0.13.3.
-
In Settings → Admin → Models, open a paid AnonRouter model that supports tool calling, such as
deepseek/deepseek-v4.1-flash-uncensored. Use a specific model ID on an eligible route. -
Under Advanced Params → Add Custom Parameter, enter
toolsas the name and paste this JSON array as the value.[{"type":"anonrouter:web_search","parameters":{"max_uses":1}}] -
Turn off Builtin Tools under Capabilities and leave Tools empty for the initial test. Save the model.
-
Start a chat with that model and ask it to look up a current fact. Leave the chat's Web Search toggle off. That toggle uses a search engine configured in Open WebUI.
The model decides when to search. See Web search for eligible routes, pricing, and privacy.
Privacy and multi-user deployments
This integration uses compatibility mode. The compatibility broker receives the stable key identity and plaintext request together long enough to authorize and forward it. Prompts and responses are not intentionally retained, but this path is not unlinkable like AnonRouter's native ticket flow.
On a shared Open WebUI server, administrators choose the provider connection and can make it available to other users. Use a least-privilege inference key, set a per-key credit limit, restrict admin access, and protect the Open WebUI database and persistent data volume.
Troubleshooting
Connection verification returns 401 or 403
Confirm that the full ar_... key is present, has not been revoked, and has
OpenAI-compatible access enabled. New keys select it by default; a key
created with the setting off cannot use the static-key endpoint.
Connection verification returns 404
Enter https://api.anonrouter.ai/v1 in URL. Open WebUI appends /models
to verify the connection.
Verification passes but chat returns 404
Check API Type in the connection editor. Responses sends chat to
/v1/responses, which returns 404 on AnonRouter. Set it to
Chat Completions and save.
Models are missing
Save the connection again to repeat model discovery. If you set Model IDs (Filter), only those exact ids appear. Remove a stale id or copy a current id from the live model catalog.
A tool or file chat fails
Verify that the selected route supports tool calling and that the resulting message content remains within AnonRouter's supported Chat Completions shape. For RAG, test retrieval and ordinary chat separately before combining them.
Open WebUI setup FAQ
What URL should I enter?
Use https://api.anonrouter.ai/v1.
Can Open WebUI discover AnonRouter models automatically?
Yes. Open WebUI checks the provider's /models route and AnonRouter implements
the corresponding authenticated GET /v1/models endpoint.
Is this the private ticket flow?
No. Open WebUI sends a static bearer key, so the connection uses AnonRouter compatibility mode.
Does self-hosting Open WebUI keep every RAG document local?
Local embeddings can keep extraction and vector storage local, but passages retrieved into a prompt are sent to the remote generation route. External embeddings also receive the chunks they embed.
Sources and further reading
- Open WebUI: connect an OpenAI-compatible provider
- Open WebUI: Knowledge and RAG
- Open WebUI: deployment hardening
- Open WebUI: environment-variable reference
- AnonRouter compatibility mode
- AnonRouter models
AnonRouter is an independent service and is not affiliated with Open WebUI.