Skip to main content

enterprise_ai.multimodal

Source: sdks/python/src/enterprise_ai/multimodal/__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 MultimodalClient​

/v1/media and /v1/multimodal/*; modality helpers are attributes.

Resource

Attributes:

NameTypeRequiredDescription
audioAudioClientyes/v1/multimodal/diarize and /v1/multimodal/dlp.
imageImageClientyes/v1/multimodal/images.
sttSttClientyes/v1/multimodal/stt.
ttsTtsClientyes/v1/multimodal/tts.
videoVideoClientyes/v1/multimodal/video.
visionVisionClientyes/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.

NameTypeDefaultRequiredDescription
transportAnyyesTransport shared by the sub-clients of one client.
clientAnyNonenoParent 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).

NameTypeDefaultRequiredDescription
job_idstryesIdentifier (UUID) of the job.
statusstryesrunning, succeeded, failed or cancelled.
outputdict[str, Any] | NoneNonenoOutput of the operation (transcript, image references...).
errorstr | NoneNonenoError message of a failed job.
unitsdict[str, Any] | NoneNonenoMeasured 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).

NameTypeDefaultRequiredDescription
media_idstryesIdentifier (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).

NameTypeDefaultRequiredDescription
media_idstryesIdentifier (UUID) of the media.
include_contentboolFalsenoWhen 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).

NameTypeDefaultRequiredDescription
job_idstryesIdentifier (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).

NameTypeDefaultRequiredDescription
statusstr | NoneNonenoOnly this status: queued, running, succeeded, failed or cancelled.
operationstr | NoneNonenoOnly this operation, for example stt or image_generation.
**pageAnynoPagination 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).

NameTypeDefaultRequiredDescription
**pageAnynoPagination 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).

NameTypeDefaultRequiredDescription
contentbytesyesBytes of the file to upload.
filenamestryesName of the uploaded file, sent with the multipart part.
content_typestr'application/octet-stream'noContent type passed to the backend when the URL is signed (the type the upload is expected to send); 200 characters at most.
classificationstr | NoneNonenoOnly 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).