muapi-ai-clipping
samuraigpt/generative-media-skills
Turn long videos into viral-ready short clips with one API call—transcription, highlight ranking, and face-tracked auto-crop included.
What is muapi-ai-clipping?
Wraps muapi.ai's /ai-clipping endpoint to automatically extract and rank the most viral moments from any hosted video. Handles transcription, virality scoring (hook, emotional peak, opinion bomb, revelation, conflict, quotable, story peak, practical value), deduplication, and vertical face-tracking auto-crop server-side—no local GPU, Whisper, or LLM required.
- Transcribe and analyze long-form video (podcast, interview, lecture, vlog, stream) to identify viral moments
- Rank highlights using a virality framework (8 signal types: hook, emotional peak, opinion bomb, revelation, conflict, quotable, story peak, practical value)
- Auto-crop clips to vertical (9:16), square (1:1), or portrait (4:5) aspect ratios with face-tracking
- Deduplicate overlapping candidates and return ranked short clips with viral scores (0–100), hook lines, and hosted mp4 URLs
- Extract timestamps only (--coords-only) to skip cropping and build your own renderer
- Support batch processing, async submission, and local file upload
How to install muapi-ai-clipping
npx skills add https://github.com/samuraigpt/generative-media-skills --skill muapi-ai-clipping- muapi-cli installed and authenticated (muapi auth configure)
- MUAPI_API_KEY environment variable or valid muapi auth status
- Hosted video URL (mp4, YouTube, or local file for auto-upload)
How to use muapi-ai-clipping
- 1.Install the skill: npx skills add https://github.com/samuraigpt/generative-media-skills --skill muapi-ai-clipping
- 2.Verify muapi-cli is installed and authenticated: muapi auth status
- 3.Call the skill with a video URL and desired number of clips: bash run-ai-clipping.sh --video "https://example.com/video.mp4" --num-clips 5
- 4.Optionally specify aspect ratio (9:16 for TikTok/Reels, 1:1 for Instagram Feed, 4:5 for Pinterest) and other flags (--view, --coords-only, --async)
- 5.Review the ranked output: each clip shows viral score, hook sentence, time range, virality reason, and clip URL
- 6.Use --output-json to save the full result for downstream processing or batch operations
Use cases
- Auto-generate TikTok / Reels / Shorts from a long podcast or interview episode
- Extract the best 30–75s moments from a lecture or vlog for social media repurposing
- Batch-process multiple videos to find their most shareable clips without manual review
- Get face-tracked vertical crops for Instagram Reels or YouTube Shorts without running ffmpeg locally
- Retrieve just highlight timestamps to feed into a custom video renderer or editing pipeline
- Content creators and social media managers automating short-form clip extraction
- Podcast and video producers repurposing long-form content for multiple platforms
- Developers building video-to-shorts pipelines who want server-side processing
- Teams managing large video libraries who need fast, scalable highlight detection
muapi-ai-clipping FAQ
No. All transcription, ranking, and cropping happens server-side on muapi.ai. You only need muapi-cli and an API key.
Use the --coords-only flag to skip cropping and get only start_time / end_time for each highlight. You can then render locally with your own tool.
The API returns up to num_clips highlights if the source has enough rankable moments. For a typical 1-hour podcast, 5–8 clips is reasonable; for a 10-minute vlog, 2–3.
9:16 (TikTok / Reels / YouTube Shorts, default), 1:1 (Instagram Feed), and 4:5 (Pinterest / portrait). Default to 9:16 unless the platform is specified.
Yes. Pass a local file path to --video and the skill will auto-upload it via muapi upload file, then use the returned URL for clipping.
Full instructions (SKILL.md)
Source of truth, from samuraigpt/generative-media-skills.
slug: muapi-ai-clipping
name: muapi-ai-clipping
version: "1.0.0"
description: Turn a long video into N viral-ready short clips with a single managed API call. Wraps muapi.ai's /ai-clipping endpoint, which handles transcription, highlight ranking through a virality framework (hook / emotional peak / opinion bomb / revelation / conflict / quotable / story peak / practical value), overlap dedupe, and vertical face-tracking auto-crop server-side. No local Whisper, no local LLM, no GPU.
acceptLicenseTerms: true
AI Clipping
One API call: long video in → ranked vertical short clips out.
Each clip ships with a viral score (0–100), an opening hook line, a one-sentence "why it works" reason, and a hosted mp4 URL.
Underlying API: https://muapi.ai/playground/ai-clipping Reference implementation (open source): https://github.com/SamurAIGPT/AI-Youtube-Shorts-Generator
When to Use
- Auto-clip a podcast, interview, lecture, vlog, or stream into TikTok / Reels / Shorts.
- Extract the best 30–75s moments from any hosted video URL.
- Get face-tracked vertical (9:16), square (1:1), or portrait (4:5) crops without running ffmpeg locally.
If you only need raw timestamps for your own renderer, set --coords-only to skip cropping and just get the highlight ranges.
Agent Execution Protocol
Step 1 — Collect Inputs
| Input | Required | Default | Notes |
|---|---|---|---|
--video | yes | — | Hosted mp4 URL, or local file path (auto-uploaded), or YouTube URL (if backend supports it) |
--num-clips | no | 3 | Number of highlights to extract |
--aspect-ratio | no | 9:16 | 9:16 | 1:1 | 4:5 |
--coords-only | no | off | Return just the highlight time ranges, skip cropping |
If the user gave only a video URL, run with defaults — don't block on questions.
Step 2 — Verify Prerequisites
muapi-cliinstalled and authed (muapi auth configure)MUAPI_API_KEYavailable (env var ormuapi auth statuspasses)
That's it. No ffmpeg, no Python, no Whisper install, no LLM keys. Everything runs server-side.
Step 3 — Run the Skill
bash library/edit/ai-clipping/scripts/run-ai-clipping.sh \
--video "https://example.com/podcast.mp4" \
--num-clips 5 \
--aspect-ratio 9:16 \
--view
The script:
- Resolves
--videoto a hosted URL (uploads local files viamuapi upload fileif needed). - Calls
muapi edit clippingwith the supported parameters. - Polls until the job is done (or returns the
request_idimmediately under--async). - Prints a ranked summary and, if
--output-jsonis set, writes the full result.
What Happens Server-Side
The /ai-clipping endpoint internally runs the full pipeline so the agent doesn't have to:
- Transcribe with Whisper.
- Classify content type (podcast / interview / tutorial / vlog / lecture / monologue).
- Rank highlights through the virality framework:
- Hook moments — strong opening line that stops the scroll
- Emotional peaks — laughter, anger, vulnerability, awe
- Opinion bombs — spicy, contrarian, debate-bait takes
- Revelation moments — "wait, what?" reframes
- Conflict — disagreement, tension, callouts
- Quotable lines — tight, screenshot-worthy phrasing
- Story peaks — climax of a narrative arc
- Practical value — actionable insight a viewer will save
- Dedupe overlapping candidates by score.
- Top-N select and face-track auto-crop to the requested aspect ratio.
This is why the skill is small: the heavy lifting is on the API.
Quick Invocation Patterns
Defaults — three 9:16 clips:
bash run-ai-clipping.sh --video "https://example.com/long.mp4"
Podcast — more clips, view in player:
bash run-ai-clipping.sh --video "<URL>" --num-clips 8 --view
Square clips for Instagram feed:
bash run-ai-clipping.sh --video "<URL>" --aspect-ratio 1:1 --num-clips 3
Just the timestamps (build your own renderer):
bash run-ai-clipping.sh --video "<URL>" --coords-only --output-json result.json
Async submit (returns request_id, poll later):
REQUEST_ID=$(bash run-ai-clipping.sh --video "<URL>" --async --output-json - | jq -r '.request_id')
muapi predict wait "$REQUEST_ID" --download ./outputs
Local file:
bash run-ai-clipping.sh --video ./recording.mp4 --num-clips 5 --view
Batch — urls.txt with one URL per line:
xargs -a urls.txt -I{} bash run-ai-clipping.sh --video "{}"
Aspect Ratio Picker
| Platform | Ratio | Sweet-spot duration |
|---|---|---|
| TikTok / Reels / YouTube Shorts | 9:16 | 30–75s |
| Instagram Feed | 1:1 | 15–45s |
| Pinterest / portrait | 4:5 | 30–60s |
Default to 9:16 unless the platform is specified.
Output Schema
{
"source_video_url": "...",
"shorts": [
{
"title": "The one mistake that cost me $50K",
"start_time": 124.3,
"end_time": 187.6,
"score": 92,
"hook_sentence": "Nobody talks about this, but it killed my first startup...",
"virality_reason": "Opens with a number + regret, peaks on a contrarian lesson",
"clip_url": "https://.../short_1.mp4"
}
]
}
When --coords-only is set, each entry has start_time/end_time but no clip_url — render locally with ffmpeg.
When reporting back to the user, surface for each clip: rank, score, time range, title, hook, and clip URL.
Common Mistakes to Avoid
- Wrong aspect ratio for the platform — Shorts / TikTok / Reels are
9:16. Default to that. - Padding to hit
num_clips— if the API returns fewer survivors than requested, return what you have. Don't pretend. - Re-running on a 404'd clip URL — the same
request_idcan be re-fetched withmuapi predict wait <id>rather than re-clipping. - Trying to tune Whisper / chunk size / LLM prompts — those knobs aren't exposed; the endpoint handles them.
Failure Modes
- API key missing or rejected — surface the exact error; never fabricate a key.
- Job timed out — bump poll timeout (
--poll-timeout) and retry. - Source URL not reachable from the backend — upload locally with
muapi upload file <path>first, then pass the returned URL. - Fewer clips returned than requested — the source had fewer rankable highlights. Return what came back with a note.
Done Criteria
The skill is done when:
result.shortshas up tonum_clipsentries, each with a workingclip_url(orstart_time/end_timeunder--coords-only).- The user has been shown the ranked list (score, time range, title, hook, URL).
- If
--output-jsonwas set, the file exists and parses.
Related skills
More from samuraigpt/generative-media-skills and the wider catalog.

muapi-cinema-director
Direct cinematic video with AI—translate creative intent into technical camera, lighting, and movement directives for Veo3, Kling, and Luma.

muapi-instagram-post
Generate polished Instagram posts with on-brand hero images, captions, and hashtags.

muapi-logo-creator
Engineer minimalist, scalable vector-style logos using geometric primitives and negative space.

muapi-media-editing
Edit and enhance images and videos with AI via muapi.ai — prompt-based editing, upscaling, background removal, face swap, lipsync, video effects, and more

muapi-media-generation
Generate AI images, videos, music, and audio from the terminal via muapi.ai — supports 100+ models including Flux, Midjourney v7, Kling 3.0, Veo3, and Suno V5

muapi-nano-banana
Reasoning-driven image generation with structured creative briefs and logic-based prompting via muapi.ai