بنقرة واحدة
minimax-m2-7
MiniMax M2.7 Plus — Chat, TTS, Image Gen, Video (Hailuo), Music, Voice Cloning
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
MiniMax M2.7 Plus — Chat, TTS, Image Gen, Video (Hailuo), Music, Voice Cloning
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Transforms the Hermes agent from a reactive question-answerer into a proactive autonomous executor. ARCHITECT takes any high-level goal, decomposes it into a dependency-aware task graph, executes each step with validation, self-corrects on failure, and delivers results — all without hand-holding. The missing execution layer for personal AI agents. Zero dependencies. Zero config. Works with any model. Pairs with apex-agent and agent-memoria for the complete autonomous agent stack.
Auto-reflective self-improvement skill — extracts learnings from corrections and success patterns, permanently encodes them into memory and skills. Philosophy: Correct once, never again.
Orchestrate multi-agent teams with defined roles, task lifecycles, handoff protocols, and review workflows. Use when: (1) Setting up a team of 2+ agents with different specializations, (2) Defining task routing and lifecycle (inbox → spec → build → review → done), (3) Creating handoff protocols between agents, (4) Establishing review and quality gates, (5) Managing async communication and artifact sharing between agents.
Integrate existing autonomous agents (like Hermes) into multi-agent orchestration platforms (AionUI, LangChain, etc.) via ACP over stdio.
MiniMax Agent Platform (agent.minimax.io) — MaxHermes, MaxClaw, Skills marketplace. Relacao com Hermes Agent (NousResearch) e OpenClaw.
Paperclip AI agent operations — creating agents with hierarchy, autonomous operation via hierarchical issues, and troubleshooting. Use when: creating agents, setting up org hierarchy, recovering from errors, or monitoring agent health.
| name | minimax-m2-7 |
| description | MiniMax M2.7 Plus — Chat, TTS, Image Gen, Video (Hailuo), Music, Voice Cloning |
Chave ja configurada no environment. Bearer token usado em todos os requests.
Base URL: https://api.minimaxi.com/v1 (OpenAI兼容) ou https://api.minimaxi.com/anthropic (Anthropic兼容)
NOTA: O dominio e minimaxi.com (com "i"), nao minimax.io.
Se tens pago do Nous Portal (nousportal.com), o Hermes já tem acesso integrado:
image-01)Zero API keys adicionais necessárias.
Isto é uma alternativa ao uso direto da API MiniMax. Se só precisas de chat, TTS simples ou search, o Tool Gateway pode ser mais rápido de configurar.
| Recurso | Limite | Janela |
|---|---|---|
| Text Generation (M2.7) | 4.500 | 5h rolling |
| TTS HD (speech-02-hd) | 4.000 | diário |
| Image Generation (image-01) | 50 | diário |
| Video (Hailuo 2.3) | - | - |
| Music (Music-2.6) | 100 | diário |
| Music-cover | 100 | diário |
curl -s -X GET "https://api.minimax.io/v1/query/quota" \
-H "Authorization: Bearer ***"
Resposta inclui remain, limit, reset_at por recurso. Verificar antes de tasks grandes.
Endpoint: POST /text/chatcompletion_v2
curl -s -X POST "https://api.minimax.io/v1/text/chatcompletion_v2" \
-H "Authorization: Bearer $MINIMAX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"MiniMax-M2.7","messages":[{"role":"user","content":"Olá"}],"max_tokens":1024}'
Models: MiniMax-M2.7, MiniMax-M2.7-highspeed, MiniMax-M2.5, MiniMax-M2.5-highspeed
Modelo ERRADO: MiniMax-Text-01 dá erro 2061 — só funciona no plano pago. Usar sempre MiniMax-M2.7.
O M2.7 usa reasoning interno que consome tokens. Se max_tokens for baixo (ex: 5-10), o content vem vazio e o texto aparece só em reasoning_content.
Fix: usar max_tokens: 200 mínimo para garantir que content é preenchido.
# ✅ CERTO — content aparece
{"model": "MiniMax-M2.7", "messages": [...], "max_tokens": 200}
# ❌ ERRADO — content vazio, texto só no reasoning
{"model": "MiniMax-M2.7", "messages": [...], "max_tokens": 5}
Resposta correta:
{
"choices": [{
"message": {
"content": "OK", // ← texto real
"reasoning_content": "..." // ← reasoning
}
}]
}
| Model | Context Window |
|---|---|
| M2.7 | 204,800 tokens |
| M2.7-highspeed | 204,800 tokens |
| M2.5 | 204,800 tokens |
| M2.5-highspeed | 204,800 tokens |
| M2.1 | 204,800 tokens |
IMPORTANTE: Todos os modelos de texto MiniMax tem exatamente 204,800 tokens. Nao existe 1M de contexto.
Como de Abr/2026, não há registro de M2.8 no site oficial, docs ou release notes. Release mais recente é M2.7 (Mar/2026).
O MiniMax é raro no mercado — quase nenhum competitor oferece API unlimited por mensalidade fixa (~$20/mês). A maioria cobra por token (OpenAI, Anthropic, Google, DeepSeek, Grok).
Endpoint: POST /t2a_v2
curl -s -X POST "https://api.minimax.io/v1/t2a_v2" \
-H "Authorization: Bearer $MINIMAX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "speech-2.8-hd",
"text": "Olá, como vai você?",
"stream": false,
"output_format": "hex",
"voice_setting": {"voice_id": "male-qn-qingse", "speed": 0.95, "vol": 1.0, "pitch": 0},
"audio_setting": {"sample_rate": 32000, "bitrate": 128000, "format": "mp3", "channel": 1}
}'
Models: speech-2.8-hd ✅ (único que funciona neste plano), speech-2.8-turbo, speech-2.6-hd, speech-2.6-turbo
Nota: speech-02-hd e speech-02-turbo NÃO estão disponíveis — erro 2061.
male-qn-qingse — masculino suave ✅ ← PADRÃO GLOBAL (config.yaml)female-qn-bella — feminino alternativo ✅English_expressive_narrator ✅male-qn-junny | female-qn-floral | female-qn-yisu | male-qn-qingse_4k — verificar antes de usarhappy, sad, angry, fearful, disgusted, surprised, neutral
(laughs), (chuckle), (coughs), (clear-throat), (groans), (breath), (pant), (inhale), (exhale), (gasps), (sniffs), (sighs), (snorts), (burps), (lip-smacking), (humming), (hissing), (emm), (sneezes)
Retorna hex encoded. Para salvar como MP3:
echo "$HEX_RESPONSE" | xxd -r -p > output.mp3
male-qn-qingse ou male-qn-junnypitch e speedEndpoint: POST /image_generation
curl -s -X POST "https://api.minimax.io/v1/image_generation" \
-H "Authorization: Bearer $MINIMAX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"image-01","prompt":"A serene portrait of a Brazilian therapist","output_format":"url","output_size":"1k"}'
Models: image-01
output_size: 1k (1024×1024), 2k (2048×2048), 3k (3072×3072), 1:1, 16:9, 9:16, 4:3, 3:4
Response: JSON com data.image_urls — é um array de URLs, não image_url (string única).确认 key 为 data.image_urls[0]。
import urllib.request, json, re, os
# Ler MINIMAX_API_KEY do ~/.hermes/.env (chave nao vem do env do terminal)
with open(os.path.expanduser("~/.hermes/.env")) as f:
for line in f:
if line.strip().startswith("MINIMAX_API_KEY="):
api_key = re.split(r"\s+#", line.strip().split("=", 1)[1])[0].strip()
break
data = json.dumps({
"model": "image-01",
"prompt": "your prompt here",
"output_format": "url",
"output_size": "1:1" # 1k|2k|3k|1:1|16:9|9:16|4:3|3:4
}).encode()
req = urllib.request.Request(
"https://api.minimax.io/v1/image_generation",
data=data,
headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
method="POST"
)
with urllib.request.urlopen(req, timeout=120) as resp:
result = json.loads(resp.read())
img_url = result["data"]["image_urls"][0] # ← array, nao string
# Baixar imediatamente — URL expira
img_data = urllib.request.urlopen(img_url, timeout=60).read()
with open("output.jpg", "wb") as f:
f.write(img_data)
curl -s "URL_DA_IMAGEM" -o imagem.jpg
Endpoint: POST /v1/video_generation
Model: MiniMax-Hailuo-2.3 ou MiniMax-Hailuo-2.3-Fast
curl -s -X POST "https://api.minimax.io/v1/video_generation" \
-H "Authorization: Bearer $MINIMAX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"MiniMax-Hailuo-2.3-Fast","prompt":"A serene beach at sunset"}'
Resolução: 1080p (6s), 768p (6s/10s), 512p (6s/10s) FPS: 24 fps
Para I2V (image to video), usar input_image_url em vez de prompt.
Endpoint: POST /v1/music_generation
Model: Music-2.6 (latest), Music-Cover, Music-2.0, Music-1.5
curl -s -X POST "https://api.minimax.io/v1/music_generation" \
-H "Authorization: Bearer $MINIMAX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"Music-2.6","prompt":"A calm ambient music track with soft piano"}'
Options:
prompt: text descriptionlyrics: lyrics textaudio_url: reference audio for style transfer (Music-Cover)Via console.minimax.io → Voice Clone:
Skill original: minimax-token-plan-troubleshooting
Erros HTTP 429: insufficient balance (1008) com plano MiniMax Token Plan pago ($20/4500 requests-hora), mesmo com quota aparentemente disponível.
insufficient balance (1008) significa que a quota de requests da janela de 5 horas foi agotada.sk-cp-...) é exclusivamente para Token Plan. Não funciona com API standard.curl -s -X GET "https://www.minimax.io/v1/token_plan/remains" \
-H "Authorization: Bearer $MINIMAX_API_KEY" \
-H "Content-Type: application/json"
Resposta:
{"model_remains": [{"model_name": "MiniMax-M*", "current_interval_usage_count": 404, "current_interval_total_count": 4500}]}
Cálculo rápido: 4500 - 404 = 4096 requests restantes na janela de 5h.
Padrão correcto — HTTP Network Check (NÃO consome quota):
def check_minimax_connectivity():
try:
import urllib.request
url = "https://api.minimax.io/v1"
req = urllib.request.Request(url)
req.add_header("User-Agent", "BianinhoMonitor/1.0")
with urllib.request.urlopen(req, timeout=8) as resp:
if resp.status in (200, 404, 405, 400):
return True
return False
except Exception:
return False
| Cron Job | Antes | Depois | Impacto |
|---|---|---|---|
| Server Resilience Manager | */5 * * * * | */30 * * * * | -216 chamadas/dia |
| Proactive Monitor | 12x/dia LLM | 12x/dia HTTP only | -100% quota |
| Server Health Check | 1x/hora | 1x/2h | -12 chamadas/dia |
***): health checks não conseguem usar key mascarada — usar apenas HTTP check./v1/token_plan/remains precisa de key real: se a key está mascarada, retorna 403. Não usar para health checks — apenas diagnóstico..env production é lida pelo systemd: cron jobs user-level não herdam — verificar que scripts herdam variáveis correctas.O erro NÃO é HTTP 4xx — é HTTP 200 com vectors: null e base_resp.status_code.
Sintomas:
vectors: null{"vectors": null, "base_resp": {"status_code": 2013, "status_msg": "invalid params"}}Padrão de debug:
# Testar endpoint directamente para ver resposta exacta
import json, urllib.request
key = "YOUR_KEY"
payload = {"model": "embo-01", "texts": ["test query"], "type": "db"}
req = urllib.request.Request("https://api.minimax.io/v1/embeddings",
data=json.dumps(payload).encode(),
headers={"Authorization": f"Bearer {key}", "Content-Type": "application/json"},
method="POST")
with urllib.request.urlopen(req, timeout=15) as resp:
print(resp.read().decode()) # Ver resposta exacta
Skill original: minimax-api-key-types
| Key Type | Prefix | Requires | Error if Empty |
|---|---|---|---|
| Pay-as-you-go | sk-api-xxx | Pre-paid balance | insufficient balance (1008) |
| Token Plan | sk-cp-xxx | Active plan | Works if plan active |
sk-api-sk-cp-1. Test API → 401 Unauthorized → Key invalid/expired
2. Test API → 429 insufficient_balance → Wrong key type (pay-as-you-go without balance)
3. Solution → Use Token Plan key (sk-cp-xxx) instead
401 login fail → Invalid429 insufficient balance → Valid but no balance200 OK → Token Plan works!| Code | Significado |
|---|---|
| 0 | Success |
| 1004 | Authentication failed |
| 2013 | Invalid params |
| 2054 | Voice ID not exist |
| 10001 | Rate limit |