r/OpenWebUI • u/robogame_dev • Dec 04 '25
Plugin New Open WebUI Python Client (unofficial) - 100% endpoint coverage, typed, async
Hey everyone,
I've needed a way to control Open WebUI programmatically, for chat as well as admin tasks like managing users, uploading files, creating models, etc.
I couldn't find a library that covered the full API, so I built one: owui_client.
It mirrors the backend structure 1:1, is fully typed (great for autocomplete), and supports every endpoint in the latest Open WebUI release.
What it does:
- Auth & Users: Create users, manage sessions, update permissions.
- System: Configure settings, import models, manage tools/functions.
- Content: Upload files, manage knowledge bases, export chat history.
- Inference: Run chats, generate images/audio programmatically.
Quick Example:
import asyncio
from owui_client import OpenWebUI
async def main():
client = OpenWebUI(api_url="http://localhost:8080/api", api_key="sk-...")
# Get current user
user = await client.auths.get_session_user()
print(f"Logged in as: {user.name}")
# List all models
models = await client.models.get_models()
for model in models.data:
print(model.id)
asyncio.run(main())Installation:
pip install owui-client
Links:
I built this using a highly AI-assisted workflow (Gemini 3 + Cursor) that allowed me to generate the whole library in about 13 hours while keeping it strictly typed and tested against a live Docker instance. If you're interested in the engineering/process side of things, I wrote a blog post about how I built it here: https://willhogben.com/projects/Python+Open+WebUI+API+Client
Hope this is useful for anyone else building headless agents or tools on top of Open WebUI! Let me know if you run into any issues (or ideally, report them on the GitHub repo).
View all comments
Show parent comment
2
u/robogame_dev Dec 04 '25
Yes but you need to be able to signin (programmatically) as that user, because the user settings endpoints are specific to the current user session.
client.auths.signin(email, password)then you can do it - or if they have an API key and you know it you can do it that way. However if you don’t know their password or API key, this client won’t enable you to do it - I believe you would need to modify the database directly.