$git clone https://github.com/SamurAIGPT/muapi-cliOfficial command-line interface for muapi.ai — generate images, videos, and audio directly from your terminal.
| 1 | # muapi CLI |
| 2 | |
| 3 | [](https://muapi.ai?utm_source=github&utm_medium=badge&utm_campaign=muapi-cli) |
| 4 | |
| 5 | |
| 6 | Official command-line interface for [muapi.ai](https://muapi.ai?utm_source=github&utm_medium=readme&utm_campaign=muapi-cli) — generate images, videos, and audio directly from your terminal. |
| 7 | |
| 8 | **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). |
| 9 | |
| 10 | ## Related Projects |
| 11 | |
| 12 | - [Open-Generative-AI](https://github.com/Anil-matcha/Open-Generative-AI) — Browser-based GUI for the same models — no CLI required |
| 13 | - [Awesome-GPT-Image-2-API-Prompts](https://github.com/Anil-matcha/Awesome-GPT-Image-2-API-Prompts) — Curated prompt library to run via this CLI |
| 14 | - [ai-creator-academy](https://github.com/Anil-matcha/ai-creator-academy) — free curriculum teaching creators how to monetize generative AI, including running models via this CLI |
| 15 | |
| 16 | ## Install |
| 17 | |
| 18 | ```bash |
| 19 | # npm (recommended — no Python required) |
| 20 | npm install -g muapi-cli |
| 21 | |
| 22 | # pip |
| 23 | pip install muapi-cli |
| 24 | |
| 25 | # or run without installing |
| 26 | npx muapi-cli --help |
| 27 | ``` |
| 28 | |
| 29 | ## Quick Start |
| 30 | |
| 31 | ```bash |
| 32 | # New user? Create an account |
| 33 | muapi auth register --email you@example.com --password "..." |
| 34 | muapi auth verify --email you@example.com --otp 123456 |
| 35 | muapi auth login --email you@example.com --password "..." |
| 36 | |
| 37 | # Or paste an existing API key |
| 38 | muapi auth configure --api-key "YOUR_KEY" |
| 39 | |
| 40 | # Generate — pick a curated verb… |
| 41 | muapi image generate "a cyberpunk city at night" --model flux-dev |
| 42 | muapi video generate "a dog running on a beach" --model kling-master |
| 43 | muapi audio create "upbeat lo-fi hip hop for studying" |
| 44 | |
| 45 | # …or run any model by endpoint name (schema-driven, covers the whole catalog) |
| 46 | muapi run flux-dev-image -p "a cyberpunk city at night" |
| 47 | muapi run seedance-2-text-to-video -p "drone shot over snowy peaks" -i duration=5 |
| 48 | muapi run <model> -h # introspects the live OpenAPI schema |
| 49 | |
| 50 | # Check balance |
| 51 | muapi account balance |
| 52 | |
| 53 | # Wait for an existing job |
| 54 | muapi predict wait <request_id> |
| 55 | ``` |
| 56 | |
| 57 | ## Commands |
| 58 | |
| 59 | ### `muapi auth` |
| 60 | | Command | Description | |
| 61 | |---------|-------------| |
| 62 | | `muapi auth register --email x --password y` | Create a new account (sends OTP) | |
| 63 | | `muapi auth verify --email x --otp 123456` | Verify email after registration | |
| 64 | | `muapi auth login --email x --password y` | Log in and save API key automatically | |
| 65 | | `muapi auth forgot-password --email x` | Send password reset OTP | |
| 66 | | `muapi auth reset-password --email x --otp y --password z` | Reset password | |
| 67 | | `muapi auth configure` | Manually save an API key | |
| 68 | | `muapi auth whoami` | Show current API key (masked) | |
| 69 | | `muapi auth logout` | Remove stored API key | |
| 70 | |
| 71 | ### `muapi account` |
| 72 | | Command | Description | |
| 73 | |---------|-------------| |
| 74 | | `muapi account balance` | Show current credit balance | |
| 75 | | `muapi account topup --amount 20` | Add credits via Stripe checkout | |
| 76 | |
| 77 | ### `muapi keys` |
| 78 | | Command | Description | |
| 79 | |---------|-------------| |
| 80 | | `muapi keys list` | List all API keys on your account | |
| 81 | | `muapi keys create --name label` | Create a new API key (shown once) | |
| 82 | | `muapi keys delete <id>` | Delete an API key by ID | |
| 83 | |
| 84 | ### `muapi image` |
| 85 | | Command | Description | |
| 86 | |---------|-------------| |
| 87 | | `muapi image generate <prompt>` | Text-to-image generation | |
| 88 | | `muapi image edit <prompt> --image <url>` | Image-to-image editing | |
| 89 | | `muapi image models` | List available models | |
| 90 | |
| 91 | **Models:** `flux-dev`, `flux-schnell`, `flux-kontext-dev/pro/max`, `hidream-fast/dev/full`, `wan2.1`, `reve`, `gpt4o`, `midjourney`, `seedream`, `qwen` |
| 92 | |
| 93 | ### `muapi video` |
| 94 | | Command | Description | |
| 95 | |---------|-------------| |
| 96 | | `muapi vi |