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。