images
Client for the Images endpoints.
Classes
ImagesClient
ImagesClient(client: OWUIClientBase)
Bases: ResourceBase
Client for the Images endpoints.
- Code Reference client Classes OpenWebUI Attributes images
Source code in src/owui_client/client_base.py
Functions
get_config
get_config() -> ImagesConfig
Get the images configuration.
Returns:
| Type | Description |
|---|---|
ImagesConfig
|
|
Source code in src/owui_client/routers/images.py
update_config
update_config(config: ImagesConfig) -> ImagesConfig
Update the images configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
ImagesConfig
|
The new configuration. |
required |
Returns:
| Type | Description |
|---|---|
ImagesConfig
|
|
Source code in src/owui_client/routers/images.py
verify_url
Verify the image generation URL (for Automatic1111 or ComfyUI).
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the URL is valid. |
Source code in src/owui_client/routers/images.py
get_models
Get the list of available image models.
Returns:
| Type | Description |
|---|---|
List[Dict[str, str]]
|
List[Dict[str, str]]: List of models (dictionaries with 'id' and 'name'). |
Source code in src/owui_client/routers/images.py
generate_image
generate_image(
form_data: CreateImageForm,
) -> List[Dict[str, str]]
Generate images based on the provided parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
CreateImageForm
|
The image generation parameters. |
required |
Returns:
| Type | Description |
|---|---|
List[Dict[str, str]]
|
List[Dict[str, str]]: List of generated images (dictionaries with 'url'). |
Source code in src/owui_client/routers/images.py
edit_image
edit_image(
form_data: EditImageForm,
) -> List[Dict[str, str]]
Edit an image based on the provided parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
EditImageForm
|
The image edit parameters. |
required |
Returns:
| Type | Description |
|---|---|
List[Dict[str, str]]
|
List[Dict[str, str]]: List of edited images (dictionaries with 'url'). |