> Documentation
Everything you need to know about the agent-media CLI and platform. Install, generate, and manage AI media from your terminal.
# Getting Started
Install the CLI
Install agent-media globally via npm.
npm install -g agent-media-cli
Authenticate
Log in with your account. This opens your browser for a one-time password (OTP) verification.
agent-media login
Your first generation
Generate a video with a single command. The --sync flag waits for the result and returns the download URL.
agent-media generate video -p "robot dancing" --sync
Check your credits
View your remaining credit balance and current plan.
agent-media credits
# Commands Reference
agent-media ships with 28 commands organized into six categories. All commands support --help for detailed usage information.
Account
| Command | Description | Key Flags |
|---|---|---|
| login | Authenticate via browser OTP | --device |
| logout | Clear local session | - |
| whoami | Show current user info | - |
| credits | Display credit balance and usage | --json |
| plan | Show current subscription plan | - |
| config | View or set CLI configuration | --set, --get, --reset |
| profile | Display user profile details | --json |
Jobs
| Command | Description | Key Flags |
|---|---|---|
| generate | Create a new generation job | -p, --sync, --input, --duration |
| status | Check status of a job | <job-id> |
| list | List recent generation jobs | --limit, --status, --json |
| inspect | Show full job details | <job-id>, --json |
| download | Download generated media | <job-id>, --output |
| cancel | Cancel a pending/running job | <job-id> |
| retry | Retry a failed job | <job-id> |
| delete | Delete a job from history | <job-id>, --force |
Models & Info
| Command | Description | Key Flags |
|---|---|---|
| models | List all available models | --json |
| pricing | Show model credit costs | --json |
Billing
| Command | Description | Key Flags |
|---|---|---|
| subscribe | Subscribe to a plan or buy credits (waits for confirmation) | --plan, --credits, --manage |
| apikey | Manage API keys | list, create, revoke |
| usage | View usage analytics | --period, --json |
UGC & Subtitles
| Command | Description | Key Flags |
|---|---|---|
| ugc | Produce a UGC video from a script | --voice, --face-url, --style, --duration, --aspect, --music, --cta, --broll-images, --dub-language, --sync |
| subtitle | Add animated subtitles to any video | <video-or-job-id>, --style, --sync |
| persona list | List all personas | --json |
| persona create | Create a persona (voice + face) | --name, --voice, --face |
| persona delete | Delete a persona | <persona-id> |
System
| Command | Description | Key Flags |
|---|---|---|
| doctor | Run diagnostic checks | - |
| version | Print CLI version | - |
# Models
agent-media provides access to the following AI generation models. Use the slug when specifying a model in the CLI.
| Model | Slug | Type | Duration | Resolution |
|---|---|---|---|---|
| AI Video Pro (Kling) | video-pro | Video | 5-10s | 1080p |
| AI Video Cinematic (Veo) | video-cinematic | Video | 4-8s | 4K |
| AI Video Realism (Sora) | video-realism | Video | 4-15s | 1080p |
| AI Video Fast (Seedance) | video-fast | Video | 2-12s | 1080p |
Run agent-media models for the latest list and agent-media pricing for credit costs per model.
# Generation
Basic generation
Provide a model slug and a prompt with the -p flag.
agent-media generate <model> -p "your prompt here"
Synchronous mode
Add --sync to wait for the job to complete and receive the download URL directly in your terminal.
agent-media generate video -p "ocean waves at sunset" --sync
Image-to-video
Use --input to provide a reference image for image-to-video generation.
agent-media generate video -p "camera zoom out" --input photo.jpg --sync
Generation options
Fine-tune your generation with additional flags.
| Flag | Description | Example |
|---|---|---|
| --duration | Video duration in seconds | --duration 5 |
| --resolution | Output resolution | --resolution 720p |
| --aspect-ratio | Aspect ratio for output | --aspect-ratio 16:9 |
| --seed | Seed for reproducible results | --seed 42 |
| --input | Reference image path | --input ref.jpg |
| --sync | Wait for completion | --sync |
Examples
Video generation
agent-media generate video -p "cinematic drone shot of a forest" --duration 5 --sync
Video with custom duration
agent-media generate video -p "timelapse of city traffic" --duration 10 --sync
Image-to-video
agent-media generate video -p "slow pan right" --input landscape.jpg --sync
# UGC Generation
The UGC pipeline turns a script into a polished video with talking heads, AI B-roll, voiceover, and animated subtitles — all in one command. The pipeline: script → scene splitting → TTS → talking heads + B-roll → assembly → subtitles → output.
Basic UGC generation
Provide a script and the pipeline handles the rest.
agent-media ugc "Ever wonder why some videos go viral? It's not luck..." --sync
AI Script Writer
Skip the script — describe your product and let GPT-4o write it. Costs +5 credits on top of the standard pipeline price.
agent-media ugc -g "A yoga mat with extra grip for hot yoga" --sync
agent-media ugc -g "Sleep tracker app" --product-url https://example.com --sync
With face photo
Add a face photo for talking head scenes. The TTS voice is auto-detected from the face photo when no --voice is specified.
agent-media ugc "Your script here..." --face-url ./photo.png --sync
With persona
Use a saved persona for consistent voice and face across videos.
agent-media ugc "Your script here..." --persona my-brand-voice --sync
Examples
Basic UGC from script
agent-media ugc "Your script text here..." --sync
With face photo for talking heads + auto voice detection
agent-media ugc "script..." --face-url ./photo.png --sync
With custom B-roll images per scene
agent-media ugc "script..." --broll-images "https://img1.jpg,https://img2.jpg" --sync
Dub into Spanish
agent-media ugc "script..." --dub-language es --sync
Full options
agent-media ugc "script..." --face-url ./photo.png --style hormozi --duration 15 --aspect 9:16 --music chill --cta "Follow for more" --sync
UGC options
| Flag | Description | Example |
|---|---|---|
| -g, --generate-script | AI writes the script from a one-line prompt (+5 credits) | -g "fitness tracker" |
| --product-url | Product URL for script generation context | --product-url https://... |
| --voice | TTS voice (auto-detected from face photo if omitted) | --voice nova |
| --tone | Voice tone: energetic, calm, confident, dramatic | --tone energetic |
| --tts-provider | Force TTS provider | --tts-provider auto |
| --face-url | Face photo for talking heads + auto voice detection | --face-url photo.png |
| --persona | Use saved persona | --persona brand-voice |
| --style | Subtitle style (hormozi, minimal, bold, karaoke, clean, tiktok, neon) | --style tiktok |
| --duration | Target duration (5/10/15) | --duration 15 |
| --aspect | Aspect ratio | --aspect 16:9 |
| --music | Background music genre | --music chill |
| --cta | End screen text | --cta "Follow for more" |
| --model | B-roll model | --model video |
| --broll-images | Custom B-roll images (comma-separated URLs) | --broll-images "url1,url2" |
| --dub-language | Dub final video (BCP-47 code) | --dub-language es |
| --sync | Wait for completion | --sync |
Add subtitles to any video
Use the subtitle command to add animated subtitles to an existing video or completed job.
agent-media subtitle <video-or-job-id> --style bold --sync
Available styles: hormozi (yellow karaoke highlight), minimal, bold (neon cyan), karaoke (green pop animation), clean (white on dark box), tiktok (huge white text, thick black stroke), neon (cyan text with magenta karaoke glow).
Persona management
Create and manage personas for consistent voice and face across UGC videos.
Create a persona
agent-media persona create --name "brand-voice" --voice ./sample.mp3 --face ./photo.png
List personas
agent-media persona list
Delete a persona
agent-media persona delete <persona-id>
# Plans & Credits
agent-media uses a credit-based system. Each generation costs a certain number of credits depending on the model and output settings. Choose a plan that fits your workflow.
| Plan | Price | Credits | Max Resolution | Concurrent Jobs | Extras |
|---|---|---|---|---|---|
| Creator | $39/mo | 3,900 | 1080p | 3 | Up to 10s videos |
| Pro | $69/mo | 6,900 | 2K | 5 | Up to 15s videos, priority queue |
| Pro Plus | $129/mo | 12,900 | 2K | 10 | Up to 15s videos, API access |
Monthly credits reset each billing cycle. Additional credit packs available via the CLI.
# API Keys
API keys allow you to authenticate in scripts, CI/CD pipelines, and automated workflows without an interactive login session. Available on the Pro Plus plan.
List your keys
agent-media apikey list
Create a new key
agent-media apikey create --name "my-key"
Revoke a key
agent-media apikey revoke <key-id>
Use in scripts
Set the AGENT_MEDIA_API_KEY environment variable to authenticate without interactive login.
AGENT_MEDIA_API_KEY=ma_xxx agent-media generate video -p "automated render" --sync
# Gallery & Dashboard
The web dashboard at agent-media.ai/gallery provides a visual interface for managing your generations and account.
Gallery
Browse all your completed generations. Preview videos and images, download files, and delete jobs you no longer need.
Billing
Manage your subscription, view credit balance, transaction history, and access the Stripe Customer Portal.
Settings
Update your profile, manage API keys, and configure account preferences.
# Claude Code Skill
agent-media is available as a Claude Code skill. Install it with one command and your AI coding assistant can generate UGC videos on your behalf.
Install the Skill
Install using the skills CLI (works with Claude Code, Cursor, Copilot, Cline, and more):
npx skills add yuvalsuede/agent-media-skill
Or install manually — download the SKILL.md and add it to your project:
# Download the skill curl -o SKILL.md https://raw.githubusercontent.com/yuvalsuede/agent-media-skill/main/SKILL.md # Add to your Claude Code project mkdir -p .claude/skills mv SKILL.md .claude/skills/agent-media.md
What you can do
Once the skill is active, talk to Claude naturally:
How it works
The skill gives Claude full knowledge of every agent-media command, model, and flag. Claude picks the right actor and model for your request, counts script words to match the duration, checks your credits, runs the generation with --sync, and presents the result — all within your coding session.
# Claude Code Skill
agent-media works as a native skill inside Claude Code. Once installed, Claude can produce complete UGC videos directly from your terminal session.
What Claude does for you
The skill handles the full UGC workflow automatically:
Example session
You: "Make a 10-second UGC review of Postiz with screenshots from their site" Claude: I'll create a UGC review video for Postiz. 1. Fetching screenshots from postiz.com... 2. Picking actor naomi with energetic tone 3. Writing 25-word script for 10s duration 4. Running: agent-media ugc "..." --actor naomi --broll --broll-images ... --sync ✓ Video ready: https://...ugc-final.mp4