← 返回
开发者工具 Key 中文

Minimax Usage

Monitor MiniMax Coding Plan usage via API to track total, used, remaining prompts, reset time, and receive alerts above 80% usage.
通过 API 监控 MiniMax Coding Plan 用量,跟踪总量、已用、剩余次数、重置时间,使用超 80% 时报警。
weapon3k
开发者工具 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 408
下载
💾 6
安装
1
版本
#latest

概述

minimax-usage

Monitor MiniMax Coding Plan usage via API. Check remaining prompts, usage percentage, and reset time.

Description

This skill provides a command-line tool to query your MiniMax Coding Plan usage through the official API. It displays:

  • Total available prompts (based on your subscription)
  • Current usage across all time windows
  • Remaining prompts
  • Time until next reset
  • Warning alerts when usage exceeds 80%

Requirements

  • Python 3.8+
  • requests library
  • Windows (for environment variable reading)
  • MiniMax Coding Plan subscription
  • MiniMax Coding Plan API Key

Setup

1. Get API Key

  1. Visit MiniMax Console
  2. Create a new Coding Plan Key
  3. Copy the key

2. Set Environment Variable

Windows PowerShell (User-level, permanent):

[System.Environment]::SetEnvironmentVariable("MINIMAX_CODING_KEY", "your-api-key-here", "User")

Windows PowerShell (Session-level, temporary):

$env:MINIMAX_CODING_KEY = "your-api-key-here"

Linux/Mac:

export MINIMAX_CODING_KEY="your-api-key-here"

3. Install Dependencies

pip install requests

Usage

Basic Check

python check_minimax.py

With Notifications

python check_minimax.py --notify

JSON Output

python check_minimax.py --json

Output Example

=== MiniMax Coding Plan Usage ===
Model: MiniMax-M2
Total Available: 1,500 prompts
Used (all windows): 500 (33.3%)
Remaining: 1,000 prompts (66.7%)
Reset in: 2h 30m
Status: [OK]

Integration

Add to Heartbeat (OpenClaw)

In your HEARTBEAT.md:

### MiniMax Usage Check (Hourly)
- Run: python scripts/check_minimax.py --notify
- Alert: Less than 20% remaining

Cron Job (Linux/Mac)

# Add to crontab
0 * * * * /path/to/check_minimax.py --notify

Technical Details

  • API Endpoint: https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains
  • Auth: Bearer token (Coding Plan API Key)
  • Important: The API returns usage_count as REMAINING prompts, not used!
  • Window Calculation: 15 x 5-hour windows (1500 total = 15 × 100 for Plus plan)
  • Total = 1500 prompts
  • Used = 1500 - usage_count
  • Current window = usage_count % 100

Files

minimax-usage/
├── SKILL.md              # This file
├── README.md             # Setup guide
├── check_minimax.py      # Main script
└── requirements.txt       # Python dependencies

License

MIT

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 19:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,654
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 65 📥 179,690
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 920 📥 185,700