Skip to main content

enterprise_ai.multimodal.image

Source: sdks/python/src/enterprise_ai/multimodal/image/__init__.py. Back to the Python SDK reference index.

note

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).

NameTypeDefaultRequiredDescription
media_idstryesStored image media to edit.
promptstryesWhat to change (1 to 8000 characters).
modelstr | NoneNonenoModel to use. Default: the configured adapter.
sizestr | NoneNonenoSize <width>x<height> in pixels. Default 1024x1024.
**extraAnynoExtra 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).

NameTypeDefaultRequiredDescription
promptstryesDescription of the image (1 to 8000 characters), inspected by the DLP.
modelstr | NoneNonenoModel to use. Default: the configured adapter.
sizestr | NoneNonenoSize <width>x<height> in pixels. Default 1024x1024.
nint1noNumber of images (1 to 8, default 1).
**extraAnynoExtra fields merged into the request body.

Returns: Any. Decoded JSON answer of the operation "Generate images".

Raises: the typed errors of the transport (Errors).