Skip to content

client

Main client module for the Open WebUI API.

This module provides the OpenWebUI class, which serves as the primary entry point for interacting with the Open WebUI backend. It aggregates various sub-clients (routers) to provide access to all supported API endpoints.

Classes

OpenWebUI

OpenWebUI(
    api_url: str = "http://127.0.0.1:8080/api",
    api_key: str | None = None,
)

Bases: OWUIClientBase

Main client for the Open WebUI API.

This class aggregates all the sub-resource clients (routers) to provide a single entry point for the API.

Parameters:

Name Type Description Default
api_url str

The base URL for the Open WebUI API. Defaults to "http://127.0.0.1:8080/api".

'http://127.0.0.1:8080/api'
api_key str | None

The API key to be used for authentication. Defaults to None.

None
Source code in src/owui_client/client.py
def __init__(
    self, api_url: str = "http://127.0.0.1:8080/api", api_key: str | None = None
):
    super().__init__(api_url=api_url, api_key=api_key)

    self.auths = AuthsClient(self)
    """Client for Authentication endpoints."""

    self.users = UsersClient(self)
    """Client for Users endpoints."""

    self.configs = ConfigsClient(self)
    """Client for Configs endpoints."""

    self.notes = NotesClient(self)
    """Client for Notes endpoints."""

    self.groups = GroupsClient(self)
    """Client for Groups endpoints."""

    self.prompts = PromptsClient(self)
    """Client for Prompts endpoints."""

    self.files = FilesClient(self)
    """Client for Files endpoints."""

    self.openai = OpenAIClient(self)
    """Client for OpenAI-compatible endpoints."""

    self.ollama = OllamaClient(self)
    """Client for Ollama endpoints."""

    self.pipelines = PipelinesClient(self)
    """Client for Pipelines endpoints."""

    self.tasks = TasksClient(self)
    """Client for Tasks endpoints."""

    self.images = ImagesClient(self)
    """Client for Images endpoints."""

    self.audio = AudioClient(self)
    """Client for Audio endpoints."""

    self.retrieval = RetrievalClient(self)
    """Client for Retrieval endpoints."""

    self.channels = ChannelsClient(self)
    """Client for Channels endpoints."""

    self.chats = ChatsClient(self)
    """Client for Chats endpoints."""

    self.models = ModelsClient(self)
    """Client for Models endpoints."""

    self.knowledge = KnowledgeClient(self)
    """Client for Knowledge endpoints."""

    self.tools = ToolsClient(self)
    """Client for Tools endpoints."""

    self.memories = MemoriesClient(self)
    """Client for Memories endpoints."""

    self.folders = FoldersClient(self)
    """Client for Folders endpoints."""

    self.functions = FunctionsClient(self)
    """Client for Functions endpoints."""

    self.evaluations = EvaluationsClient(self)
    """Client for Evaluations endpoints."""

    self.utils = UtilsClient(self)
    """Client for Utils endpoints."""

    self.root = RootClient(self)
    """Client for Root endpoints."""

    self.shortcuts = Shortcuts(self)
    """Helper for shortcut methods."""

Attributes

auths
auths = AuthsClient(self)

Client for Authentication endpoints.

users
users = UsersClient(self)

Client for Users endpoints.

configs
configs = ConfigsClient(self)

Client for Configs endpoints.

notes
notes = NotesClient(self)

Client for Notes endpoints.

groups
groups = GroupsClient(self)

Client for Groups endpoints.

prompts
prompts = PromptsClient(self)

Client for Prompts endpoints.

files
files = FilesClient(self)

Client for Files endpoints.

openai
openai = OpenAIClient(self)

Client for OpenAI-compatible endpoints.

ollama
ollama = OllamaClient(self)

Client for Ollama endpoints.

pipelines
pipelines = PipelinesClient(self)

Client for Pipelines endpoints.

tasks
tasks = TasksClient(self)

Client for Tasks endpoints.

images
images = ImagesClient(self)

Client for Images endpoints.

audio
audio = AudioClient(self)

Client for Audio endpoints.

retrieval
retrieval = RetrievalClient(self)

Client for Retrieval endpoints.

channels
channels = ChannelsClient(self)

Client for Channels endpoints.

chats
chats = ChatsClient(self)

Client for Chats endpoints.

models
models = ModelsClient(self)

Client for Models endpoints.

knowledge
knowledge = KnowledgeClient(self)

Client for Knowledge endpoints.

tools
tools = ToolsClient(self)

Client for Tools endpoints.

memories
memories = MemoriesClient(self)

Client for Memories endpoints.

folders
folders = FoldersClient(self)

Client for Folders endpoints.

functions
functions = FunctionsClient(self)

Client for Functions endpoints.

evaluations
evaluations = EvaluationsClient(self)

Client for Evaluations endpoints.

utils
utils = UtilsClient(self)

Client for Utils endpoints.

root
root = RootClient(self)

Client for Root endpoints.

shortcuts
shortcuts = Shortcuts(self)

Helper for shortcut methods.