SamurAIGPT

muapi cli

Built by SamurAIGPT 974 stars

What is muapi cli?

Official CLI for muapi.ai — generate images, videos & audio from the terminal. MCP server, 14 AI models, npm + pip installable.

How to use muapi cli?

1. Install a compatible MCP client (like Claude Desktop). 2. Open your configuration settings. 3. Add muapi cli using the following command: npx @modelcontextprotocol/muapi-cli 4. Restart the client and verify the new tools are active.
🛡️ Scoped (Restricted)
npx @modelcontextprotocol/muapi-cli --scope restricted
🔓 Unrestricted Access
npx @modelcontextprotocol/muapi-cli

Key Features

Native MCP Protocol Support
Real-time Tool Activation & Execution
Verified High-performance Implementation
Secure Resource & Context Handling

Optimized Use Cases

Extending AI models with custom local capabilities
Automating system workflows via natural language
Connecting external data sources to LLM context windows

muapi cli FAQ

Q

Is muapi cli safe?

Yes, muapi cli follows the standardized Model Context Protocol security patterns and only executes tools with explicit user-granted permissions.

Q

Is muapi cli up to date?

muapi cli is currently active in the registry with 974 stars on GitHub, indicating its reliability and community support.

Q

Are there any limits for muapi cli?

Usage limits depend on the specific implementation of the MCP server and your system resources. Refer to the official documentation below for technical details.

Official Documentation

View on GitHub

muapi CLI

Official command-line interface for muapi.ai — generate images, videos, and audio directly from your terminal.

Agent-first design — every command works for both humans (colored output, tables) and AI agents (--output-json, --jq filtering, semantic exit codes, MCP server mode).

Install

# npm (recommended — no Python required)
npm install -g muapi-cli

# pip
pip install muapi-cli

# or run without installing
npx muapi-cli --help

Quick Start

# New user? Create an account
muapi auth register --email you@example.com --password "..."
muapi auth verify --email you@example.com --otp 123456
muapi auth login --email you@example.com --password "..."

# Or paste an existing API key
muapi auth configure --api-key "YOUR_KEY"

# Generate
muapi image generate "a cyberpunk city at night" --model flux-dev
muapi video generate "a dog running on a beach" --model kling-master
muapi audio create "upbeat lo-fi hip hop for studying"

# Check balance
muapi account balance

# Wait for an existing job
muapi predict wait <request_id>

Commands

muapi auth

CommandDescription
muapi auth register --email x --password yCreate a new account (sends OTP)
muapi auth verify --email x --otp 123456Verify email after registration
muapi auth login --email x --password yLog in and save API key automatically
muapi auth forgot-password --email xSend password reset OTP
muapi auth reset-password --email x --otp y --password zReset password
muapi auth configureManually save an API key
muapi auth whoamiShow current API key (masked)
muapi auth logoutRemove stored API key

muapi account

CommandDescription
muapi account balanceShow current credit balance
muapi account topup --amount 20Add credits via Stripe checkout

muapi keys

CommandDescription
muapi keys listList all API keys on your account
muapi keys create --name labelCreate a new API key (shown once)
muapi keys delete <id>Delete an API key by ID

muapi image

CommandDescription
muapi image generate <prompt>Text-to-image generation
muapi image edit <prompt> --image <url>Image-to-image editing
muapi image modelsList available models

Models: flux-dev, flux-schnell, flux-kontext-dev/pro/max, hidream-fast/dev/full, wan2.1, reve, gpt4o, midjourney, seedream, qwen

muapi video

CommandDescription
muapi video generate <prompt>Text-to-video generation
muapi video from-image <prompt> --image <url>Image-to-video animation
muapi video modelsList available models

Models: veo3, veo3-fast, kling-master, kling-std, kling-pro, wan2.1/2.2, seedance-pro/lite, hunyuan, runway, pixverse, vidu, minimax-std/pro

muapi audio

CommandDescription
muapi audio create <prompt>Create music with Suno
muapi audio remix <song-id>Remix an existing Suno song
muapi audio extend <song-id>Extend a Suno song
muapi audio from-text <prompt>Generate audio with MMAudio
muapi audio from-video <video-url>Add AI audio to a video

muapi enhance

CommandDescription
muapi enhance upscale <url>AI image upscaling
muapi enhance bg-remove <url>Remove background
muapi enhance face-swap --source <url> --target <url>Face swap image/video
muapi enhance skin <url>Skin enhancement
muapi enhance colorize <url>Colorize B&W photo
muapi enhance ghibli <url>Ghibli anime style
muapi enhance anime <url>Anime style conversion
muapi enhance extend <url>Outpaint/extend image
muapi enhance product-shot <url>Professional product photo
muapi enhance erase <url> --mask <url>Object removal

muapi edit

CommandDescription
muapi edit effects --video <url> --effect <name>AI video/image effects
muapi edit lipsync --video <url> --audio <url>Lip sync to audio
muapi edit dance --image <url> --video <url>Make person dance
muapi edit dress --image <url>Change clothing
muapi edit clipping <video-url>AI highlight extraction

muapi predict

CommandDescription
muapi predict result <id>Fetch current status (no polling)
muapi predict wait <id>Wait until complete

muapi upload

CommandDescription
muapi upload file <path>Upload a local file → get hosted URL

muapi models

CommandDescription
muapi models listList all models
muapi models list --category videoFilter by category

muapi config

CommandDescription
muapi config set <key> <value>Set a persistent default
muapi config get <key>Read a config value
muapi config listShow all config

Useful keys: output (json/human), model.image, model.video, no_color (true/false)

muapi docs

CommandDescription
muapi docs openapiFetch the full OpenAPI spec
muapi docs openOpen Swagger UI in browser

muapi mcp

CommandDescription
muapi mcp serveStart MCP server (stdio) for AI agents

Global Options

FlagDescription
--wait / --no-waitPoll until done (default: --wait)
--output-json / -jPrint raw JSON response
--jq <expr>Filter JSON output (e.g. '.outputs[0]')
--download <dir> / -dAuto-download outputs to directory
--no-colorDisable colored output

Environment Variables

VariableDescription
MUAPI_API_KEYAPI key (overrides keychain/config)
MUAPI_BASE_URLOverride API base URL
NO_COLORDisable colored output

Exit Codes

CodeMeaning
0Success
1General error
3Authentication error
4Rate limited
5Not found
6Billing error
7Timeout
8Validation error

MCP Server

Run as a Model Context Protocol server for Claude Desktop, Cursor, or any MCP-compatible agent:

muapi mcp serve

Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "muapi": {
      "command": "muapi",
      "args": ["mcp", "serve"],
      "env": { "MUAPI_API_KEY": "your-key-here" }
    }
  }
}

Exposes 19 tools: image generate/edit, video generate/from-image, audio create/from-text, enhance (upscale/bg-remove/face-swap/ghibli), edit lipsync/clipping, predict result, upload file, keys list/create/delete, account balance/topup.

Agentic Pipeline Examples

# Full onboarding without human intervention
muapi auth register --email agent@example.com --password "secret"
muapi auth verify --email agent@example.com --otp 123456
muapi auth login --email agent@example.com --password "secret"
muapi account balance --output-json
muapi account topup --amount 10 --output-json --no-open

# Submit async, capture request_id, poll when ready
REQUEST_ID=$(muapi video generate "a dog on a beach" \
  --model kling-master --no-wait --output-json --jq '.request_id' | tr -d '"')
muapi predict wait "$REQUEST_ID" --download ./outputs

# Chain: upload → edit → download
URL=$(muapi upload file ./photo.jpg --output-json --jq '.url' | tr -d '"')
muapi image edit "make it look like a painting" --image "$URL" \
  --model flux-kontext-pro --download ./outputs

# Rotate API keys programmatically
NEW_KEY=$(muapi keys create --name "ci-$(date +%Y%m%d)" --output-json --jq '.api_key' | tr -d '"')
OLD_ID=$(muapi keys list --output-json --jq '.[0].id')
muapi keys delete "$OLD_ID" --yes

# Discover available endpoints
muapi docs openapi --jq '.paths | keys[]'

Shell Completions

muapi --install-completion bash
muapi --install-completion zsh
muapi --install-completion fish

Global Ranking

-
Trust ScoreMCPHub Index

Based on codebase health & activity.

Manual Config

{ "mcpServers": { "muapi-cli": { "command": "npx", "args": ["muapi-cli"] } } }