Self-Host ChatGPT with Open WebUI and Antbase
ยท4 min read
๐Ÿ’ฌ

Self-Host ChatGPT with Open WebUI and Antbase

Run Open WebUI locally and connect it to Antbase for a self-hosted ChatGPT experience with intelligent model routing.

open-webuiself-hostedchat

Self-hosting a ChatGPT alternative sounds great until you actually try it. You spin up Open WebUI, point it at one provider, and now you have a chat interface that is locked to a single model. Want to use Claude for writing and GPT-4o for code? That is two separate configurations. Want a free model for casual questions so you are not burning credits on "what is the capital of France"? You are out of luck โ€” every message hits the same endpoint at the same price.

Antbase turns Open WebUI from a single-model chat interface into a genuinely intelligent assistant. When you set Antbase as the backend, every message gets classified and routed to the best available model. Casual questions go to fast free models, coding questions go to models that excel at code, and complex reasoning tasks get escalated to premium models. It is like having access to every model at once, with someone smart picking the right one for each message.

The self-hosting story gets better too. Because Antbase has built-in failover across providers, your chat interface stays up even if one provider has an outage. No more "sorry, the AI is down" messages to your team. You get a ChatGPT-quality experience that you fully control, with better model diversity and lower costs than any single provider could offer.

Open WebUI is an open-source ChatGPT-style interface that works with any OpenAI-compatible API. Point it at Antbase and you get a polished chat UI with intelligent model routing, conversation history, and multi-model access โ€” all self-hosted.

Launch with Docker

bash
docker run -d \
  --name open-webui \
  -p 3000:8080 \
  -e OPENAI_API_BASE_URL=https://antbase.ai/v1 \
  -e OPENAI_API_KEY=ant_your-api-key \
  -v open-webui:/app/backend/data \
  ghcr.io/open-webui/open-webui:main

Open http://localhost:3000 and create an admin account. The model list populates from Antbase automatically โ€” you will see all available models including the virtual "auto" model.

Selecting Models

In the chat interface, use the model dropdown to pick a model. Select "auto" to let Antbase route each message to the optimal model. Or pick a specific model like gpt-4o or claude-sonnet to pin your requests.

Tips

  • โ€ขOpen WebUI stores conversations locally in the Docker volume. Your chat history persists across restarts.
  • โ€ขIf models don't appear, check the connection settings under Admin > Settings > Connections. Ensure the URL ends with /v1.
  • โ€ขFor multiple users, enable authentication in Open WebUI settings. Each user can have different default models.
  • โ€ขImage generation and TTS endpoints are separate โ€” configure those separately if needed.

Try ANT routing today

Drop-in OpenAI-compatible API. Change your base URL and every request gets intelligent routing across 30+ providers.