33 lines
1.4 KiB
Bash
33 lines
1.4 KiB
Bash
#!/bin/bash
|
|
|
|
echo "╔══════════════════════════════════════════════════════╗"
|
|
echo "║ 📊 MINIMAX CODING PLAN QUOTA ║"
|
|
echo "╚══════════════════════════════════════════════════════╝"
|
|
|
|
response=$(curl -s -X GET "https://api.minimax.io/v1/api/openplatform/coding_plan/remains" \
|
|
-H "Authorization: Bearer $MINIMAX_API_KEY" \
|
|
-H "Content-Type: application/json")
|
|
|
|
if echo "$response" | grep -q "error"; then
|
|
echo "❌ Error: $response"
|
|
exit 1
|
|
fi
|
|
|
|
echo "$response" | python3 -c "
|
|
import json, sys
|
|
data = json.load(sys.stdin)
|
|
for m in data.get('model_remains', []):
|
|
remaining_min = m['remains_time']/1000/60
|
|
used = m['current_interval_usage_count']
|
|
total = m['current_interval_total_count']
|
|
pct = (used/total)*100
|
|
|
|
print(f\"\n📱 Modelo: {m['model_name']}\")
|
|
print(f\"⏱️ Tiempo restante: {remaining_min:.1f} minutos\")
|
|
print(f\"📊 Requests usados: {used}/{total} ({pct:.1f}%)\")
|
|
print(f\"📅 Período: Semanal\")
|
|
"
|
|
|
|
echo ""
|
|
echo "═══════════════════════════════════════════════════════"
|