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
Client for Authentication endpoints.
users
Client for Users endpoints.
configs
Client for Configs endpoints.
notes
Client for Notes endpoints.
groups
Client for Groups endpoints.
prompts
Client for Prompts endpoints.
files
Client for Files endpoints.
openai
Client for OpenAI-compatible endpoints.
ollama
Client for Ollama endpoints.
pipelines
Client for Pipelines endpoints.
tasks
Client for Tasks endpoints.
images
Client for Images endpoints.
audio
Client for Audio endpoints.
retrieval
Client for Retrieval endpoints.
channels
Client for Channels endpoints.
chats
Client for Chats endpoints.
models
Client for Models endpoints.
knowledge
Client for Knowledge endpoints.
Client for Tools endpoints.
memories
Client for Memories endpoints.
folders
Client for Folders endpoints.
functions
Client for Functions endpoints.
evaluations
Client for Evaluations endpoints.
utils
Client for Utils endpoints.
root
Client for Root endpoints.
shortcuts
Helper for shortcut methods.