
Muapi Media Generation
Generate or remix audio and music via muapi.ai from the terminal with style prompts, optional async jobs, and API key storage in .env.
Install
npx skills add https://github.com/samuraigpt/generative-media-skills --skill muapi-media-generationWhat is this skill?
- Bash entrypoint targeting https://api.muapi.ai/api/v1 with --op create and style/prompt flags
- --add-key flow writes MUAPI_KEY to .env after interactive or argument input
- Suno model default V5; supports audio/video URL or file inputs and configurable duration
- --async mode with --timeout (default max wait 300s) and poll interval 5s
- JSON-only output option for piping results into agent or CI steps
Adoption & trust: 709 installs on skills.sh; 3.5k GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Journey fit
Build integrations is the primary shelf because the skill is a shell workflow around the muapi.ai REST API for creating media assets inside your product or content pipeline. Integrations fits third-party API orchestration—create operations, polling, timeouts, and local .env key management—not core UI layout work.
Common Questions / FAQ
Is Muapi Media Generation safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Muapi Media Generation
#!/bin/bash # muapi.ai Audio & Music Generation # Usage: ./create-music.sh --op create --style "lo-fi" --prompt "chill beats" set -e MUAPI_BASE="https://api.muapi.ai/api/v1" OP="create" STYLE="" PROMPT="" SUNO_MODEL="V5" AUDIO_URL="" AUDIO_FILE="" VIDEO_URL="" VIDEO_FILE="" DURATION=10 ASYNC=false JSON_ONLY=false MAX_WAIT=300 POLL_INTERVAL=5 for arg in "$@"; do if [ "$arg" = "--add-key" ]; then shift KEY_VALUE="" if [[ -n "$1" && ! "$1" =~ ^-- ]]; then KEY_VALUE="$1"; fi if [ -z "$KEY_VALUE" ]; then echo "Enter your muapi.ai API key:" >&2; read -r KEY_VALUE; fi if [ -n "$KEY_VALUE" ]; then grep -v "^MUAPI_KEY=" .env > .env.tmp 2>/dev/null || true mv .env.tmp .env 2>/dev/null || true echo "MUAPI_KEY=$KEY_VALUE" >> .env echo "MUAPI_KEY saved to .env" >&2 fi exit 0 fi done if [ -f ".env" ]; then source .env 2>/dev/null || true; fi while [[ $# -gt 0 ]]; do case $1 in --op) OP="$2"; shift 2 ;; --style) STYLE="$2"; shift 2 ;; --prompt|-p) PROMPT="$2"; shift 2 ;; --suno-model) SUNO_MODEL="$2"; shift 2 ;; --audio-url) AUDIO_URL="$2"; shift 2 ;; --audio-file) AUDIO_FILE="$2"; shift 2 ;; --video-url) VIDEO_URL="$2"; shift 2 ;; --video-file) VIDEO_FILE="$2"; shift 2 ;; --duration) DURATION="$2"; shift 2 ;; --async) ASYNC=true; shift ;; --timeout) MAX_WAIT="$2"; shift 2 ;; --json) JSON_ONLY=true; shift ;; --help|-h) echo "muapi.ai Audio & Music Generation" >&2 echo "" >&2 echo "Operations (--op):" >&2 echo " create Suno music creation (default)" >&2 echo " remix Suno remix (requires --audio-url)" >&2 echo " extend Suno extend (requires --audio-url)" >&2 echo " text-to-audio MMAudio from text prompt" >&2 echo " video-to-audio MMAudio from video (requires --video-url)" >&2 echo "" >&2 echo "Examples:" >&2 echo " bash create-music.sh --style \"lo-fi hip hop\" --prompt \"chill beats\"" >&2 echo " bash create-music.sh --op text-to-audio --prompt \"thunderstorm\" --duration 15" >&2 echo " bash create-music.sh --op video-to-audio --video-url URL --prompt \"epic score\"" >&2 echo "" >&2 echo "File Inputs:" >&2 echo " --audio-file Local audio file for remix/extend" >&2 echo " --video-file Local video file for video-to-audio" >&2 exit 0 ;; *) shift ;; esac done if [ -z "$MUAPI_KEY" ]; then echo "Error: MUAPI_KEY not set" >&2; exit 1; fi HEADERS=(-H "x-api-key: $MUAPI_KEY" -H "Content-Type: application/json") PROMPT_JSON=$(echo "${PROMPT:-}" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read().rstrip()))') STYLE_JSON=$(echo "${STYLE:-}" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read().rstrip()))') # Auto-upload local files upload_file() { local FPATH="$1" if [ ! -f "$FPATH" ]; then echo "Error: File not found: $FPATH" >&2; exit 1; fi [ "$JSON_ONLY" = false ] && echo "Uploading $(basename "$FPATH")..." >&2 local RESP=$(curl -s -X POST "${MUAPI_BASE}/upload_file" -H "x-api-key: $MUAPI_KEY" -F "file=@${FPATH}") local URL=$(echo "$RESP" | jq -r '.url // empty') if [ -z "$URL" ]; then local ERR=$(echo "$RESP" | jq -r '.error // .detail // "Upload failed"') echo "Error: $ERR" >&2; exit 1 fi echo "$URL" } if [ -n "$AUDIO_FILE" ]; then AUDIO_URL=$(upload_file "$AUDIO_FILE"); fi if [ -n "$VIDEO_FILE" ]; then VIDEO_URL=$(upload_file "$VIDEO_FILE"); fi case $OP in create) if [ -z "$STYLE" ]; then echo "Error: --style is required for create" >&2; exit 1; fi ENDPOINT="suno-create-music" PAYLOAD="{\"style\": $STYLE_JSON, \"prompt\": $PROMPT_JSON, \"model\": \"$SUNO_MODEL\"}