Prerequisites
No extra package is required beyondagno — the toolkit uses httpx, an Agno core dependency. The example also uses the openai library:
MINIMAX_API_KEY environment variable. Get your key from MiniMax’s platform.
Example
cookbook/91_tools/minimax_tools.py
How Generation Runs
generate_video submits the prompt, reads the task id from the response, and polls the task status every poll_interval seconds until MiniMax reports it succeeded, failed, or cancelled — or until max_wait_time is reached. The tool call blocks for the whole wait; each poll request times out at timeout seconds, clipped to the remaining budget.
On success, the tool returns “Video generated successfully” with the video attached as an agno.media.Video artifact carrying a remote URL (video/mp4). The bytes are never downloaded — how long MiniMax serves the URL is MiniMax’s side; see MiniMax’s platform docs.
The tool never raises. Every failure comes back as the tool result’s text: a missing task id or video URL, the failure message on a failed or cancelled task, “Video generation timed out after max_wait_time seconds”, or “Error generating video: …” for HTTP errors.
Custom Endpoints
region selects the default endpoint: "global_en" uses https://api.minimax.io/v2/video_generation and "cn_zh" uses https://api.minimaxi.com/v2/video_generation. Any other value raises a ValueError at construction — also when base_url is set.
base_url, when set, overrides the region default and must be the full video-generation endpoint. The task-status endpoint is not configurable separately: it is derived by replacing /v2/video_generation with /v2/query/video_generation in base_url, with the task id appended. A trailing slash is stripped.
Toolkit Params
Toolkit Functions
The function has an async variant registered under the same name, used automatically with
arun and aprint_response.