Skip to main content

Unofficial async Python client for the complete Open WebUI API.

Project description

Unofficial Open WebUI API Documentation and Python Client

📚 Full Documentation Site

This project provides both a robust, async Python client for the complete Open WebUI API and comprehensive unofficial documentation for the Open WebUI API in general.

Python Client

A fully typed, async Python client that mirrors the backend structure of Open WebUI, providing an auto-completable interface for every endpoint.

Target Open WebUI Version

This client is designed to work with the latest version of Open WebUI. The client is updated to stay in sync with the upstream Open WebUI backend.

For best compatibility, use this client with the latest Open WebUI release.

Installation

pip install owui-client

Quick Start

import asyncio
from owui_client import OpenWebUI

async def main():
    # Connect to your Open WebUI instance
    client = OpenWebUI(
        api_url="http://localhost:8080/api", 
        api_key="sk-..."
    )

    # Example: Get current user info
    user = await client.auths.get_session_user()
    print(f"Hello, {user.name}!")

    # Example: List all models
    models = await client.models.get_models()
    for model in models.data:
        print(model.id)

if __name__ == "__main__":
    asyncio.run(main())

Locating Endpoints

The client structure matches the Open WebUI backend router structure exactly. If you know the API endpoint or backend path, you know the client function.

API Group Client Attribute Description
Auth & Users client.auths Sign in/up, API keys, session management
client.users User management, permissions, settings
client.groups Group management
Content client.chats Chat history, messages, archiving
client.prompts Prompt management
client.files File uploads and management
client.knowledge Knowledge base operations
Inference client.openai OpenAI-compatible chat completions & config
client.ollama Ollama configuration & endpoints
client.images Image generation endpoints
client.audio TTS and STT endpoints
System client.configs Global system configurations
client.models Model management (delete, update, import)
client.tools Tool management
client.functions Function management

Tip: Use your IDE's autocomplete on the client object to explore all available resources.

API Documentation

The documentation site provides comprehensive coverage of all API endpoints, models, and their fields. This includes detailed descriptions of every field of every model, calculated automatically by examining their usage in the Open WebUI source code.

The field descriptions are extracted from:

  • Type annotations and Pydantic model definitions
  • Docstrings and comments in the source code
  • Actual usage patterns found throughout the codebase
  • API response examples and validation logic

This documentation is useful even if you're not using the Python client - it serves as a complete reference for the Open WebUI API, including all valid key/values accepted by dict fields.

Compatibility

This client is maintained to be compatible with the latest Open WebUI release. Due to the rapid development pace of Open WebUI, there may be brief periods where the client is slightly ahead or behind the latest release. The drift test in the test suite can help identify any discrepancies.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

owui_client-1.6.1.tar.gz (84.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

owui_client-1.6.1-py3-none-any.whl (114.6 kB view details)

Uploaded Python 3

File details

Details for the file owui_client-1.6.1.tar.gz.

File metadata

  • Download URL: owui_client-1.6.1.tar.gz
  • Upload date:
  • Size: 84.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for owui_client-1.6.1.tar.gz
Algorithm Hash digest
SHA256 3abcf73dbb2ca33cd7746a2bef93cd9fe092d0b3ca472a7f63ea0fae09a9487e
MD5 8d4b1e41af8914b203eae73b766d6198
BLAKE2b-256 7cd10bf9bd8276a2bef694c159dded0e414a14c186ab7ec8fda74ce03f696687

See more details on using hashes here.

File details

Details for the file owui_client-1.6.1-py3-none-any.whl.

File metadata

  • Download URL: owui_client-1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 114.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for owui_client-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 375ba21f2c07e274137d464a88fe1045da45865666065b9997c18f4a103ffab9
MD5 f5378b407f6a8d1d10c07d5d1ad92e7e
BLAKE2b-256 2996849311c5bc6d8cb225abab31ff8678f75efcdde3216c95172c9875601aff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page