← Catalog

@zgltyq/pi-minimax-image

Fallback image understanding for models without native vision support - provides understand_image tool via MiniMax API

Extension

Install

Install with PiG

pig install npm:@zgltyq/pi-minimax-image

Install with Pi

pi install npm:@zgltyq/pi-minimax-image
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

README

Written by the package's publisher, shown as published in version 1.0.2 (README.md). PiG does not review it.

pi-minimax-image

MiniMax Image Understanding extension for pi coding agent — provides AI-powered image understanding as a fallback for models without native vision support.

⚠️ Use only when the model does not natively support image understanding. Many models (Claude, Gemini, GPT-4V) can process images directly via the read tool. This extension's understand_image tool routes images through the MiniMax API — use it only when the model you're running cannot natively see images.

Why This Package?

Built for image understanding fallback. While pi-web-access handles web search and URL fetching, this package specializes in AI-powered image analysis for models without built-in vision.

Use this package when you need to:

  • 📸 Analyze screenshots, diagrams, and UI mockups
  • 🔤 Extract text from images (OCR)
  • 🖥️ Transcribe code from screenshots
  • 🎨 Get AI descriptions of visual content
  • 📊 Analyze charts, graphs, and data visualizations

No conflicts. This extension only provides understand_image - it won't interfere with other packages like pi-web-access.

Features

  • 🖼️ Image Understanding - Analyze images with AI for descriptions, OCR, code extraction, and visual analysis
  • ⚡ Easy Configuration - Configure via environment variables or pi settings files
  • 🔄 Hot Reload - Changes apply without restarting pi
  • 🎨 Rich UI - Custom rendering with progress indicators and status updates
  • ✅ Focused - Only adds image understanding, no bloat

Prerequisites

Installation

pi install npm:@zgltyq/pi-minimax-image

Or via git:

pi install git:github.com/zgltyq/minimax-understand-image

Configuration

Get Your API Key

  1. Visit MiniMax Coding Plan to subscribe
  2. Get your API key from API Key page

Environment Variable

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

Auth File

Save to ~/.pi/agent/auth.json:

{
  "minimax": {
    "type": "api_key",
    "key": "your-api-key-here"
  }
}

Interactive Setup

/minimax-configure --key your-api-key-here

Usage

Image Understanding

understand_image({
  prompt: "What error is shown in this screenshot?",
  image_url: "https://example.com/error.png"
})
Image Sources
  • HTTP/HTTPS URLs: "https://example.com/image.jpg"
  • Local paths: "/home/user/image.png" or "./screenshot.jpg"
Example Use Cases
// Describe image content
understand_image({
  prompt: "Describe what's in this image in detail",
  image_url: "https://example.com/photo.jpg"
})

// Extract text (OCR)
understand_image({
  prompt: "Extract all text from this image",
  image_url: "./screenshots/document.png"
})

// Analyze UI/UX
understand_image({
  prompt: "Analyze this UI design and suggest improvements",
  image_url: "https://example.com/mockup.png"
})

// Code from screenshot
understand_image({
  prompt: "What code is shown in this screenshot? Transcribe it exactly.",
  image_url: "./error-screenshot.jpg"
})

// Analyze data visualizations
understand_image({
  prompt: "What trends and insights can you extract from this chart?",
  image_url: "./analytics.png"
})

Tool Reference

understand_image

ParameterTypeRequiredDescription
promptstring✓Question or analysis request (1-1000 characters)
image_urlstring✓Image URL or local file path

Commands

CommandDescription
/minimax-configureConfigure API key
/minimax-statusShow configuration status
  • pi-web-access - Web search, URL fetching, GitHub repos, YouTube videos, PDFs

Learn More

License

MIT