Tools
Minimax Media
OpenClaw MiniMax media plugin with image, music, video, TTS, and web search tools.
Install
npm install spec
Configuration Example
{
"plugins": {
"entries": {
"openclaw-minimax-media": {
"enabled": true,
"config": {
"apiKey": "YOUR_MINIMAX_CODING_PLAN_API_KEY",
"vlmTimeoutMs": 30000,
"imageGenerationTimeoutMs": 180000,
"musicGenerationTimeoutMs": 300000,
"videoGenerationTimeoutMs": 1200000,
"ttsTimeoutMs": 120000,
"searchTimeoutMs": 10000
}
}
}
}
}
README
# Openclaw MiniMax Media
Openclaw MiniMax Media is an OpenClaw plugin that registers MiniMax-powered tools for media and search workflows. It currently provides image understanding through the MiniMax Coding Plan VLM API, image generation through MiniMax `image-01`, music generation through MiniMax `music-2.6`, video generation through MiniMax `MiniMax-Hailuo-2.3`, text-to-speech through MiniMax `speech-2.8-hd`, and web search through the MiniMax Coding Plan search API. All six tools use the same MiniMax Coding Plan (Token Plan) API key.
## Naming
This package follows the scoped npm package pattern used by official OpenClaw
plugins: the npm package is published under the maintainer scope, while the
OpenClaw plugin identity remains unscoped and stable.
| Item | Value |
| --- | --- |
| npm package | `@jwongart/openclaw-minimax-media` |
| npm install spec | `@jwongart/openclaw-minimax-media` |
| plugin ID | `openclaw-minimax-media` |
| config path | `plugins.entries.openclaw-minimax-media` |
| plugin name | `Openclaw MiniMax Media` |
| tool names | `minimax_image`, `minimax_image_generate`, `minimax_music_generate`, `minimax_video_generate`, `minimax_tts`, `minimax_web_search` |
## Features
- Provides the `minimax_image` OpenClaw tool for image understanding.
- Provides the `minimax_image_generate` OpenClaw tool for MiniMax `image-01` image generation.
- Provides the `minimax_music_generate` OpenClaw tool for MiniMax `music-2.6` music generation.
- Provides the `minimax_video_generate` OpenClaw tool for MiniMax `MiniMax-Hailuo-2.3` video generation.
- Provides the `minimax_tts` OpenClaw tool for MiniMax `speech-2.8-hd` text-to-speech with `Chinese (Mandarin)_Warm_Girl`.
- Provides the `minimax_web_search` OpenClaw tool, merged from `openclaw-minimax-web-search`.
- Uses MiniMax Coding Plan APIs for VLM and web search, and MiniMax media APIs for image generation, music generation, video generation, and TTS.
- Reads credentials from OpenClaw plugin config, `MINIMAX_CODE_PLAN_KEY`, `MINIMAX_CODING_API_KEY`, or `MINIMAX_API_KEY`.
- Accepts HTTP/HTTPS image URLs, local image paths, `@`-prefixed local paths, and Base64 data URLs.
- Supports JPEG, PNG, and WebP image inputs.
- Supports MiniMax image generation with aspect ratio control, up to 9 outputs, and one subject-reference image.
- Supports MiniMax music generation with lyrics, instrumental mode, duration hints, and MP3 output.
- Supports MiniMax video generation with text-to-video, one first-frame reference image, duration normalization, and resolution control.
- Supports MiniMax text-to-speech with MP3 output.
- Returns normalized web search result objects: title, URL, description, published date, and site name.
- Marks image analysis and search outputs as untrusted external content.
- Does not bundle any API key, token, personal account, private path, or internal network address.
## Installation
Use OpenClaw's plugin installer after publishing the package:
```bash
openclaw plugins install npm:@jwongart/[email protected] --pin
```
Restart the OpenClaw Gateway after installation if the CLI asks you to do so.
If `openclaw-minimax-web-search` is already installed and enabled, disable or uninstall it before enabling this package. Both plugins register `minimax_web_search`, and duplicate tool registration can conflict.
## Configuration
Configure the plugin under its plugin ID: `openclaw-minimax-media`.
Example OpenClaw config entry:
```json
{
"plugins": {
"entries": {
"openclaw-minimax-media": {
"enabled": true,
"config": {
"apiKey": "YOUR_MINIMAX_CODING_PLAN_API_KEY",
"vlmTimeoutMs": 30000,
"imageGenerationTimeoutMs": 180000,
"musicGenerationTimeoutMs": 300000,
"videoGenerationTimeoutMs": 1200000,
"ttsTimeoutMs": 120000,
"searchTimeoutMs": 10000
}
}
}
}
}
```
You can also provide the API key through an environment variable:
```bash
export MINIMAX_API_KEY="YOUR_MINIMAX_CODING_PLAN_API_KEY"
# Optional alternatives:
export MINIMAX_CODE_PLAN_KEY="YOUR_MINIMAX_CODING_PLAN_API_KEY"
export MINIMAX_CODING_API_KEY="YOUR_MINIMAX_CODING_PLAN_API_KEY"
# Optional: route media generation through the CN endpoint when supported by your account.
export MINIMAX_API_HOST="https://api.minimaxi.com"
```
### Config fields
| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `apiKey` | string | none | MiniMax Coding Plan (Token Plan) API key. |
| `vlmUrl` | string | `https://api.minimaxi.com/v1/coding_plan/vlm` | MiniMax Coding Plan VLM API endpoint. |
| `vlmModel` | string | `minimax-VL-01` | MiniMax VLM model name. |
| `vlmTimeoutMs` | number | `30000` | VLM request timeout in milliseconds. Valid range: 1000-120000. |
| `imageGenerationBaseUrl` | string | `https://api.minimaxi.com` | MiniMax image generation base URL. The tool appends `/v1/image_generation` unless a full endpoint is provided. |
| `imageGenerationTimeoutMs` | number | `180000` | Image generation request timeout in milliseconds. Valid range: 1000-600000. |
| `musicGenerationBaseUrl` | string | `https://api.minimaxi.com` | MiniMax music generation base URL. The tool appends `/v1/music_generation` unless a full endpoint is provided. |
| `musicGenerationTimeoutMs` | number | `300000` | Music generation request timeout in milliseconds. Valid range: 1000-900000. |
| `videoGenerationBaseUrl` | string | `https://api.minimaxi.com` | MiniMax video generation base URL. The tool appends `/v1/video_generation` unless a full endpoint is provided. |
| `videoGenerationTimeoutMs` | number | `1200000` | End-to-end video generation operation timeout in milliseconds. Valid range: 1000-1800000. |
| `ttsBaseUrl` | string | `https://api.minimaxi.com` | MiniMax T2A API base URL. The tool appends `/v1/t2a_v2` and strips trailing `/anthropic` or `/v1` suffixes. |
| `ttsTimeoutMs` | number | `120000` | TTS request timeout in milliseconds. Valid range: 1000-600000. |
| `ttsSpeed` | number | `1` | MiniMax TTS playback speed. Valid range: 0.5-2.0. |
| `ttsVolume` | number | `1` | MiniMax TTS volume. Valid range: 0.01-10. |
| `ttsPitch` | number | `0` | MiniMax TTS integer pitch shift. Valid range: -12 to 12. |
| `searchUrl` | string | `https://api.minimaxi.com/v1/coding_plan/search` | MiniMax Coding Plan search API endpoint. |
| `searchTimeoutMs` | number | `10000` | Search request timeout in milliseconds. Valid range: 1000-60000. |
## Tool: `minimax_image`
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `prompt` | string | yes | Text instruction describing what to analyze or extract from the image. |
| `image_source` | string | yes | HTTP/HTTPS image URL, local file path, `@`-prefixed local file path, or Base64 data URL. |
Example tool result shape:
```json
{
"content": "The image shows...",
"provider": "openclaw-minimax-media",
"model": "minimax-VL-01",
"sourceType": "url",
"externalContent": {
"untrusted": true,
"source": "image_analysis",
"provider": "minimax"
}
}
```
## Tool: `minimax_image_generate`
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | `"generate"` or `"list"` | no | Defaults to `generate`. Use `list` to inspect MiniMax image generation capabilities. |
| `prompt` | string | yes for generate | Image generation prompt. |
| `image` | string | no | Single subject-reference image path, URL, `@`-prefixed local path, or Base64 data URL. |
| `images` | string[] | no | Reference images. MiniMax `image-01` supports one reference image; extra entries are ignored. |
| `aspectRatio` | string | no | Supported values: `1:1`, `16:9`, `4:3`, `3:2`, `2:3`, `3:4`, `9:16`, `21:9`. |
| `count` | integer | no | Number of images to generate, from 1 to 9. Defaults to 1. |
| `timeoutMs` | integer | no | Per-call timeout in milliseconds. Valid range: 1000-600000. |
| `filename` | string | no | Output filename hint in returned image metadata. Directory components are ignored. |
MiniMax `image-01` uses the dedicated image endpoint: `{imageGenerationBaseUrl}/v1/image_generation`. The request body uses `response_format: "url"`; returned image URLs are downloaded and saved to disk, with inline Base64 responses still accepted as a fallback. Default base URL is `https://api.minimaxi.com`.
Example tool result shape:
```json
{
"provider": "openclaw-minimax-media",
"model": "image-01",
"count": 1,
"images": [
{
"path": "/tmp/openclaw-minimax-media/image-1.png",
"mimeType": "image/png",
"filename": "image-1.png"
}
],
"externalContent": {
"untrusted": true,
"source": "image_generation",
"provider": "minimax"
}
}
```
## Tool: `minimax_music_generate`
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | `"generate"` or `"list"` | no | Defaults to `generate`. Use `list` to inspect MiniMax music generation capabilities. |
| `prompt` | string | yes for generate | Music generation prompt. |
| `lyrics` | string | no | Optional lyrics text. Cannot be used with `instrumental=true`. |
| `instrumental` | boolean | no | Request instrumental-only music. |
| `durationSeconds` | number | no | Target duration hint in seconds. MiniMax receives this as part of the prompt. |
| `format` | `"mp3"` | no | Output format. MiniMax music generation currently supports MP3 only. |
| `timeoutMs` | integer | no | Per-call timeout in milliseconds. Valid range: 1000-900000. |
| `filename` | string | no | Output filename hint in returned track metadata. Directory components are ignored. |
MiniMax `music-2.6` uses the dedicated music endpoint: `{musicGenerationBaseUrl}/v1/music_generation`. The request body uses `output_format: "url"` and MP3 audio settings. The tool accepts both URL and inline audio responses from MiniMax, saves the MP3 to disk, and returns the file path. Default base URL is `https://api.minimaxi.com`.
Exam
... (truncated)
tools
Comments
Sign in to leave a comment