Skip to main content

enterprise_ai.multimodal.video

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

/v1/multimodal/video.

Resource

VideoClient.generate​

generate(prompt: str, model: str | None = None, seconds: float | None = None, size: str | None = None, **extra: Any) -> Any

Generate a video. Starts a video generation job and answers 202 with the job; follow it with GET /v1/multimodal/jobs/{job_id}. Usage is counted in video seconds. Needs tenant_admin, developer or agent.

Route: /v1/multimodal/video/generate (POST).

NameTypeDefaultRequiredDescription
promptstryesDescription of the video (1 to 8000 characters).
modelstr | NoneNonenoModel to use. Default: the configured adapter.
secondsfloat | NoneNonenoDuration in seconds (more than 0, at most 120, default 5).
sizestr | NoneNonenoSize <width>x<height> in pixels. Default 1280x720.
**extraAnynoExtra fields merged into the request body.

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

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

VideoClient.process​

process(media_id: str, fps: float | None = None, operations: list[str] | None = None, sample_rate: int | None = None, **extra: Any) -> Any

Process a video. Extracts frames and/or the audio track of a video media or inline video (201, the job; queued when ffmpeg is not available). operations accepts frames and audio only (400 invalid_request). Needs tenant_admin, developer or agent.

Route: /v1/multimodal/video/process (POST).

NameTypeDefaultRequiredDescription
media_idstryesStored video media.
fpsfloat | NoneNonenoFrames extracted per second (more than 0, at most 60, default 1).
operationslist[str] | NoneNonenoWhat to extract: frames, audio or both. Default ["frames", "audio"].
sample_rateint | NoneNonenoSample rate of the extracted audio, in Hz. Default 16000.
**extraAnynoExtra fields merged into the request body.

Returns: Any. Decoded JSON answer of the operation "Process a video".

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