Open WebUI Setup with AnonRouter

Connect a local Open WebUI instance to AnonRouter, discover models, and configure document retrieval.

Open WebUI logoOpen WebUIProvider integration guide

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 settingValue
ConnectionOpenAI API
Connection TypeExternal
URLhttps://api.anonrouter.ai/v1
AuthBearer
API KeyAn AnonRouter inference key beginning with ar_, with OpenAI-compatible access enabled
API TypeChat Completions
Advanced → Model IDsOptional 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 key

Connect through the admin interface

  1. Sign in to Open WebUI as an administrator.
  2. 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.
  3. Enter the URL and paste your inference key into API Key.
  4. Confirm API Type displays Chat Completions. The control switches modes when clicked.
  5. Use Verify Connection, then save the connection. If the Connections page also shows a Save button, click it.
  6. 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:

  1. Keep Open WebUI's default local SentenceTransformers embedding engine, or configure another embedding service you control.
  2. Create a collection under Workspace → Knowledge and upload the files.
  3. Attach only the collection needed for the chat, or bind it to a dedicated model configuration.
  4. 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_ID

Embedding 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

FeatureStatus with AnonRouter
Model discoverySupported through GET /v1/models
Chat CompletionsSupported, streaming and non-streaming
Tool callingSupported on tool-capable routes
EmbeddingsSupported with an embedding model
Inline image inputSupported on vision-capable routes using Chat Completions image parts
Responses APIUse Chat Completions with AnonRouter
Legacy text completionsNot supported
OpenAI image or audio endpointsNot 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.

These steps were tested in Open WebUI v0.13.3.

  1. 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.

  2. Under Advanced Params → Add Custom Parameter, enter tools as the name and paste this JSON array as the value.

    [{"type":"anonrouter:web_search","parameters":{"max_uses":1}}]
  3. Turn off Builtin Tools under Capabilities and leave Tools empty for the initial test. Save the model.

  4. 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

AnonRouter is an independent service and is not affiliated with Open WebUI.

Let your agent handle the setup

One prompt carries the entire setup.