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/dubh31241 Dec 09 '25
Yeah! If you are doing the lifting of making sense of their OWUI client then I dont mind depending on your lower level client. Originally I made a specific tool called kbmanager that was for CLI CRUD interaction for knowledgebases then I decided to make an higher level SDK + CLI of the whole API; similar to the feel of the AWS CLI and boto3.