enterprise_ai.multimodal.image
Source: sdks/python/src/enterprise_ai/multimodal/image/__init__.py. Back to the Python SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Class ImageClient
/v1/multimodal/images.
Resource
ImageClient.edit
edit(media_id: str, prompt: str, model: str | None = None, size: str | None = None, **extra: Any) -> Any
Edit an image. Starts an image edition job from an image media or inline image and a prompt (201, the job). The input must be an image (422 unsupported_media). Needs tenant_admin, developer or agent.
Route: /v1/multimodal/images/edit (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
media_id | str | yes | Stored image media to edit. | |
prompt | str | yes | What to change (1 to 8000 characters). | |
model | str | None | None | no | Model to use. Default: the configured adapter. |
size | str | None | None | no | Size <width>x<height> in pixels. Default 1024x1024. |
**extra | Any | no | Extra fields merged into the request body. |
Returns: Any. Decoded JSON answer of the operation "Edit an image".
Raises: the typed errors of the transport (Errors).
ImageClient.generate
generate(prompt: str, model: str | None = None, size: str | None = None, n: int = 1, **extra: Any) -> Any
Generate images. Starts an image generation job (201, the job). The prompt is inspected by the DLP in block mode first: personal data answers 422 dlp_blocked. Usage is counted per image. Needs tenant_admin, developer or agent.
Route: /v1/multimodal/images/generate (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
prompt | str | yes | Description of the image (1 to 8000 characters), inspected by the DLP. | |
model | str | None | None | no | Model to use. Default: the configured adapter. |
size | str | None | None | no | Size <width>x<height> in pixels. Default 1024x1024. |
n | int | 1 | no | Number of images (1 to 8, default 1). |
**extra | Any | no | Extra fields merged into the request body. |
Returns: Any. Decoded JSON answer of the operation "Generate images".
Raises: the typed errors of the transport (Errors).