MiniMax Token Plan Tool
Requires a Token Plan API Key
Subscribe at: MInimax Token Plan (China Mainland) or MInimax Token Plan (Global)
A lightweight MiniMax Token Plan Tool skill that directly calls official APIs using pure JavaScript. No external MCP servers.
Designed for minimal overhead and fast integration within OpenClaw.
Features
This skill provides three native capabilities of MiniMax Token Plan:
1. minimax_web_search
Web search powered by MiniMax Token Plan API.
2. minimax_understand_image
Vision-language image understanding via MiniMax VLM.
3. minimax_token_plan_remains
Query remaining Token Plan usage and quota information.
Architecture
- * Pure JavaScript implementation
- Direct HTTPS API calls
- No MCP server runtime required
- No external tool dependency
- Minimal resource usage
Configuration
Default recommendation: put MINIMAX_API_KEY and MINIMAX_API_HOST in ~/.openclaw/.env.
CODEBLOCK0
OpenClaw can load these values as the default environment for this Skill.
If you update ~/.openclaw/.env, restart OpenClaw or the gateway process if the new values are not picked up immediately.
Only these two official hosts are supported.
Use a matching Token Plan key for the selected host:
Optional API Host
CODEBLOCK1
Only https://api.minimaxi.com and https://api.minimax.io are accepted.
If MINIMAX_API_HOST is not set, the script defaults to https://api.minimaxi.com.
Tool Discovery
Execute minimax_token_plan_tool.js with environment variable MINIMAX_API_KEY and optional MINIMAX_API_HOST to dynamically register these tools:
CODEBLOCK2
Output format:
CODEBLOCK3
Tool 1 - minimaxwebsearch
Purpose
Real-time web search using MiniMax Token Plan search API.
CLI Invocation
CODEBLOCK4
Example:
CODEBLOCK5
Input Schema
CODEBLOCK6
Output Format
Success:
CODEBLOCK7
Error:
CODEBLOCK8
Tool 2 - minimaxunderstandimage
Purpose
Image understanding using MiniMax Token Plan VLM API.
Only mainstream image formats are supported (for example: JPEG/JPG, PNG, WebP, and GIF).
Supports:
- * HTTP / HTTPS image URLs
- Local file paths
- INLINECODE14 shorthand
Local files are automatically converted to base64 data URLs.
Remote image URLs are fetched by this tool and then converted to data URLs before being sent to the MiniMax API.
Remote image fetching is restricted to public HTTP/HTTPS targets and rejects localhost, private-network addresses, unsupported ports, and excessive redirects.
Security Notice
This tool requires outbound network access.
If a local image is provided, its content is transmitted to the remote MiniMax API for processing, which introduces a potential risk of local image data leakage.
Do not submit sensitive, private, or regulated images unless you fully accept this risk.
CLI Invocation
CODEBLOCK9
Examples:
Remote image:
CODEBLOCK10
Local image:
CODEBLOCK11
With @ prefix:
CODEBLOCK12
Input Schema
CODEBLOCK13
Output Format
Success:
CODEBLOCK14
Error:
CODEBLOCK15
Tool 3 - minimaxtokenplan_remains
Purpose
Query remaining Token Plan usage through the MiniMax open platform remains endpoint.
CLI Invocation
CODEBLOCK16
Input Schema
CODEBLOCK17
Output Format
Success:
CODEBLOCK18
Error:
CODEBLOCK19
Note:
- - All times are in UTC+0. Convert them based on the user's local region.
- For all models,
MiniMax-M* uses a 5-hour period. Other generative models use a 1-day period. - INLINECODE16 and
weekly_remains_time are formatted as DD:HH:MM:SS. - INLINECODE19 means the current Token Plan subscription does not include that model.
Official Recommendation
This Skill is a lightweight JavaScript implementation built on top of the official MiniMax APIs.
For best compatibility and long-term support, the official MCP is recommended:
MiniMax-Coding-Plan-MCP.
For speech synthesis, image generation, and video generation, the official Skill is recommended:
Minimax-Multimodal-Toolkit.
MiniMax Token Plan 工具
需要 Token Plan API 密钥
订阅地址:MiniMax Token Plan(中国大陆) 或 MiniMax Token Plan(全球)
一个轻量级的 MiniMax Token Plan 工具技能,使用纯 JavaScript 直接调用官方 API。无需外部 MCP 服务器。
专为最小开销和快速集成到 OpenClaw 中而设计。
功能特性
本技能提供 MiniMax Token Plan 的三项原生能力:
1. minimaxwebsearch
由 MiniMax Token Plan API 驱动的网络搜索。
2. minimaxunderstandimage
通过 MiniMax VLM 实现的视觉语言图像理解。
3. minimaxtokenplan_remains
查询剩余的 Token Plan 使用量和配额信息。
架构
- * 纯 JavaScript 实现
- 直接 HTTPS API 调用
- 无需 MCP 服务器运行时
- 无外部工具依赖
- 极低的资源占用
配置
默认建议:将 MINIMAXAPIKEY 和 MINIMAXAPIHOST 放在 ~/.openclaw/.env 文件中。
bash
~/.openclaw/.env
MINIMAX
APIKEY=sk-your-key
中国大陆
MINIMAX
APIHOST=https://api.minimaxi.com
或全球
MINIMAX
APIHOST=https://api.minimax.io
OpenClaw 可以将这些值作为此技能的默认环境变量加载。
如果更新了 ~/.openclaw/.env,请重启 OpenClaw 或网关进程,以确保新值被立即生效。
仅支持这两个官方主机地址。
请为所选主机使用匹配的 Token Plan 密钥:
可选 API 主机
bash
中国大陆
export MINIMAX
APIHOST=https://api.minimaxi.com
或全球
export MINIMAX
APIHOST=https://api.minimax.io
仅接受 https://api.minimaxi.com 和 https://api.minimax.io。
如果未设置 MINIMAXAPIHOST,脚本默认使用 https://api.minimaxi.com。
工具发现
使用环境变量 MINIMAXAPIKEY 和可选的 MINIMAXAPIHOST 执行 minimaxtokenplan_tool.js,以动态注册这些工具:
node minimaxtokenplan_tool.js tools
输出格式:
{
tools: [
{
name: minimaxwebsearch,
description: ...,
inputSchema: { ... }
},
{
name: minimaxunderstandimage,
description: ...,
inputSchema: { ... }
},
{
name: minimaxtokenplan_remains,
description: ...,
inputSchema: { ... }
}
]
}
工具 1 - minimaxwebsearch
用途
使用 MiniMax Token Plan 搜索 API 进行实时网络搜索。
CLI 调用
node minimaxtokenplantool.js websearch
示例:
node minimaxtokenplantool.js websearch OpenAI GPT-5 发布日期
输入模式
{
query: string
}
输出格式
成功:
{
success: true,
query: ...,
results: [
{
title: ...,
link: ...,
snippet: ...,
date: ...
}
],
related_searches: []
}
错误:
{
error: error message
}
工具 2 - minimaxunderstandimage
用途
使用 MiniMax Token Plan VLM API 进行图像理解。
仅支持主流图像格式(例如:JPEG/JPG、PNG、WebP 和 GIF)。
支持:
- * HTTP/HTTPS 图像 URL
- 本地文件路径
- @localfile.jpg 简写形式
本地文件会自动转换为 base64 数据 URL。
远程图像 URL 由本工具获取,然后转换为数据 URL,再发送到 MiniMax API。
远程图像获取仅限于公共 HTTP/HTTPS 目标,拒绝 localhost、私有网络地址、不支持的端口和过多的重定向。
安全提示
本工具需要出站网络访问。
如果提供了本地图像,其内容将被传输到远程 MiniMax API 进行处理,这带来了本地图像数据泄露的潜在风险。
除非您完全接受此风险,否则请勿提交敏感、私密或受监管的图像。
CLI 调用
node minimaxtokenplantool.js understandimage
示例:
远程图像:
node minimaxtokenplantool.js understandimage https://example.com/image.jpg 描述这张图片
本地图像:
node minimaxtokenplantool.js understandimage ./photo.png 可以看到哪些物体?
使用 @ 前缀:
node minimaxtokenplantool.js understandimage @photo.png 总结场景
输入模式
{
image_source: string,
prompt: string
}
输出格式
成功:
{
success: true,
prompt: ...,
image_source: ...,
analysis: model response
}
错误:
{
error: error message
}
工具 3 - minimaxtokenplan_remains
用途
通过 MiniMax 开放平台的剩余量端点查询剩余的 Token Plan 使用量。
CLI 调用
node minimaxtokenplan_tool.js remains
输入模式
{}
输出格式
成功:
{
success: true,
remains: {
...: provider response
}
}
错误:
{
error: error message
}
注意:
- - 所有时间均为 UTC+0。请根据用户所在地区进行转换。
- 对于所有模型,MiniMax-M 使用 5 小时周期。其他生成模型使用 1 天周期。
- remainstime 和 weeklyremainstime 的格式为 DD:HH:MM:SS。
- quota = 0 表示当前的 Token Plan 订阅不包含该模型。
官方推荐
本技能是基于官方 MiniMax API 构建的轻量级 JavaScript 实现。
为了获得最佳兼容性和长期支持,推荐使用官方 MCP:
MiniMax-Coding-Plan-MCP。
对于语音合成、图像生成和视频生成,推荐使用官方技能:
Minimax-Multimodal-Toolkit。