enterprise_ai.multimodal
Source: sdks/python/src/enterprise_ai/multimodal/__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 MultimodalClient
/v1/media and /v1/multimodal/*; modality helpers are attributes.
Resource
Attributes:
| Name | Type | Required | Description |
|---|---|---|---|
audio | AudioClient | yes | /v1/multimodal/diarize and /v1/multimodal/dlp. |
image | ImageClient | yes | /v1/multimodal/images. |
stt | SttClient | yes | /v1/multimodal/stt. |
tts | TtsClient | yes | /v1/multimodal/tts. |
video | VideoClient | yes | /v1/multimodal/video. |
vision | VisionClient | yes | /v1/multimodal/vision. |
Constructor MultimodalClient
MultimodalClient(transport: Any, client: Any = None) -> None
Build the client and its modality helpers vision, image, video, audio, stt and tts on the same transport.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
transport | Any | yes | Transport shared by the sub-clients of one client. | |
client | Any | None | no | Parent client. |
MultimodalClient.complete_job
complete_job(job_id: str, status: str, output: dict[str, Any] | None = None, error: str | None = None, units: dict[str, Any] | None = None) -> Any
Report the result of a queued job. Called by GPU workers (agent or service identities) to report a queued job result: status running, succeeded, failed or cancelled (else 400 invalid_request), with output, error and measured units; the quota reservation is committed or released. A finished job answers 409 conflict. Needs agent or tenant_admin. 404 not_found.
Route: /v1/multimodal/jobs/{job_id}/complete (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
job_id | str | yes | Identifier (UUID) of the job. | |
status | str | yes | running, succeeded, failed or cancelled. | |
output | dict[str, Any] | None | None | no | Output of the operation (transcript, image references...). |
error | str | None | None | no | Error message of a failed job. |
units | dict[str, Any] | None | None | no | Measured usage units, for example {"audio_seconds": 12.5}. |
Returns: Any. Decoded JSON answer of the operation "Report the result of a queued job".
Raises: the typed errors of the transport (Errors).
MultimodalClient.delete_media
delete_media(media_id: str) -> Any
Delete a media. Deletes the media and its stored content. Allowed for its creator, tenant_admin or security_officer (403 forbidden). A media under legal hold answers 409 legal_hold. Audited as media.delete.
Route: /v1/media/{media_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
media_id | str | yes | Identifier (UUID) of the media. |
Returns: Any. Decoded JSON answer of the operation "Delete a media".
Raises: the typed errors of the transport (Errors).
MultimodalClient.get_media
get_media(media_id: str, include_content: bool = False) -> Any
Get a media. Returns the Multimodal Contract document of the media. With include_content=true the answer is {media, content_base64} with the decrypted content; this needs a clearance at least equal to the media classification (403 policy_denied) and is audited as media.read.
Route: /v1/media/{media_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
media_id | str | yes | Identifier (UUID) of the media. | |
include_content | bool | False | no | When true, also return the decrypted content, base64 encoded. Default false. |
Returns: Any. Decoded JSON answer of the operation "Get a media".
Raises: the typed errors of the transport (Errors).
MultimodalClient.job
job(job_id: str) -> Any
Get a multimodal job. Returns the job: operation, status, input parameters, output, error, adapter, units and cost. 404 not_found.
Route: /v1/multimodal/jobs/{job_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
job_id | str | yes | Identifier (UUID) of the job. |
Returns: Any. Decoded JSON answer of the operation "Get a multimodal job".
Raises: the typed errors of the transport (Errors).
MultimodalClient.jobs
jobs(status: str | None = None, operation: str | None = None, **page: Any) -> Any
List the multimodal jobs. Jobs of the tenant, newest first, paginated with cursor, optionally filtered by status and operation.
Route: /v1/multimodal/jobs (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
status | str | None | None | no | Only this status: queued, running, succeeded, failed or cancelled. |
operation | str | None | None | no | Only this operation, for example stt or image_generation. |
**page | Any | no | Pagination options passed to the listing: limit (maximum number of items per page) and cursor (the next_cursor of the previous page). Iterating the returned page follows every cursor. |
Returns: Any. Decoded JSON answer of the operation "List the multimodal jobs".
Raises: the typed errors of the transport (Errors).
MultimodalClient.list_media
list_media(**page: Any) -> Any
List the media. Tenant media (Multimodal Contract documents), keyset paginated with cursor, filtered by media_type and classification (400 invalid_request for an unknown value).
Route: /v1/media (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
**page | Any | no | Pagination options passed to the listing: limit (maximum number of items per page) and cursor (the next_cursor of the previous page). Iterating the returned page follows every cursor. |
Returns: Any. Decoded JSON answer of the operation "List the media".
Raises: the typed errors of the transport (Errors).
MultimodalClient.upload
upload(content: bytes, filename: str, content_type: str = 'application/octet-stream', classification: str | None = None) -> Any
Upload a media. Stores a media (201) from JSON {content_base64, mime_type, filename?, operation?, dlp_mode?, retention_days?, classification?} or multipart/form-data with a file part and the same fields. Any tenant principal may call it. Steps: 1. Size checked against the platform maximum (50 MiB unless configured; 413 media_too_large). 2. File scan by ClamAV and YARA-X (422 file_blocked, 503 file_scan_unavailable). 3. Text extraction and DLP with dlp_mode (default detect; block answers 422 dlp_blocked when personal data is found); the classification is raised accordingly. 4. The content is encrypted with a tenant key and stored. Returns the Multimodal Contract document.
Route: /v1/media (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
content | bytes | yes | Bytes of the file to upload. | |
filename | str | yes | Name of the uploaded file, sent with the multipart part. | |
content_type | str | 'application/octet-stream' | no | Content type passed to the backend when the URL is signed (the type the upload is expected to send); 200 characters at most. |
classification | str | None | None | no | Only this classification: public, internal, confidential, restricted or secret. |
Returns: Any. Decoded JSON answer of the operation "Upload a media".
Raises: the typed errors of the transport (Errors).