title: "MuAPI CLI" description: "Official command-line interface for muapi.ai, built for humans and AI agents."
MuAPI CLI
The official command-line interface for MuAPI allows you to generate images, videos, and audio directly from your terminal.
It is built with an Agent-first design — every command works perfectly for both humans (colored output, tables) and AI agents (--output-json, semantic exit codes, MCP server mode).
Installation
# 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
# Authenticate
muapi auth login --email you@example.com --password "..."
# Or configure an existing API key
muapi auth configure --api-key "YOUR_KEY"
# Generate Media
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"
Core Commands
Authentication & Account
Manage your session and billing from the terminal.
muapi auth login: Log in and save API key.muapi auth configure: Manually save an API key.muapi account balance: Show current credit balance.
Media Generation
Generate content using our 100+ integrated AI models.
muapi image generate <prompt>: Text-to-image generation.muapi video generate <prompt>: Text-to-video generation.muapi audio create <prompt>: Create music with Suno.
Media Enhancement & Editing
Process existing images and videos.
muapi enhance upscale <url>: AI image upscaling.muapi enhance face-swap --source <url> --target <url>: Face swap image/video.muapi edit lipsync --video <url> --audio <url>: Lip sync to audio.
Workflow Orchestration
Build and run multi-node intelligent pipelines.
muapi workflow discover: Fetch a catalog of available workflows for LLM matching.muapi workflow create <prompt>: Architect a new workflow using natural language.muapi workflow run-interactive <id>: Guided CLI sequence for workflow execution.
Agentic Integration
The MuAPI CLI is designed to be the ultimate tool for AI coding assistants.
Global Options for Agents
--output-json/-j: Print raw JSON response (disables tables/colors).--jq <expr>: Filter JSON output directly (e.g.,'.outputs[0]').--no-wait: Submit work asynchronously and return arequest_id.
MCP Server
Run as a Model Context Protocol server for Claude Desktop, Cursor, or any MCP-compatible agent to instantly expose 19+ generative tools to your AI assistant.
muapi mcp serve
For Claude Desktop configuration, add this to your claude_desktop_config.json:
{
"mcpServers": {
"muapi": {
"command": "muapi",
"args": ["mcp", "serve"],
"env": { "MUAPI_API_KEY": "your-key-here" }
}
}
}
Shell Completions
Enable autocomplete for a faster workflow:
muapi --install-completion bash
muapi --install-completion zsh
muapi --install-completion fish