Masko CLI
Generate mascots, images, animations, and interactive canvases from the command line. Works standalone or with any AI agent that can run terminal commands.
Install
npx @masko/cli loginYour browser opens, you log in with your Masko account, and the API key is saved automatically. No key to copy-paste.
Or set the key manually:
export MASKO_API_KEY=masko_YOUR_API_KEYGet your API key from the Developer dashboard.
Quick Start
# Check your credits (image = 1, animation = 5/sec)
masko credits
# List art styles
masko styles
# Create a project and mascot
masko projects create --name "My App"
masko mascots create --project PROJECT_ID --prompt "a friendly pixel art robot" --style pixel
# Generate an image
masko generate --mascot MASCOT_ID --type image --name "Wave" --prompt "waving hello" --wait
# Generate an animation from scratch (creates image + animates in one step)
masko generate --mascot MASCOT_ID --type animation --name "Wave" --prompt "waving happily" --duration 4 --wait
# Animate an existing pose (just pass the item ID)
masko generate --mascot MASCOT_ID --type animation --item ITEM_ID --prompt "gentle breathing" --duration 4 --waitAfter generating an image, the CLI prints the exact command to animate it. Just copy and run.
Commands
Authentication
masko login # Open browser, log in, key saved automaticallyMascots
masko mascots create # Create a mascot
--project ID # Project ID (required)
--prompt TEXT # Character description
--style NAME # Art style (run masko styles to see options)
masko mascots list # List all mascots
--project ID # Filter by project
masko mascots get ID # Get mascot details, items, and CDN URLsGeneration
masko generate # Generate image/animation/edit/logo
--mascot ID # Mascot ID (required)
--type TYPE # image | animation | edit | logo
--prompt TEXT # What to generate (sets both pose + motion for animations)
--image-prompt TEXT # Pose description (animation from scratch)
--animation-prompt TEXT # Motion description (animation from scratch)
--item ID # Animate/edit existing item (auto-resolves source)
--duration N # Animation seconds (3-10, default 4)
--wait # Wait for completion
--json # Raw JSON output
--name NAME # Required for a new item; omit only when --item is setJobs
masko jobs get ID # Check job status
--wait # Long-poll until completion (up to 120s)
--timeout N # Custom timeout in seconds
masko jobs list # List recent jobs
--mascot ID # Filter by mascot
--status STATUS # pending | processing | completed | failedCanvas
masko templates # List available canvas templates
masko canvas create # Create canvas (optionally from a template)
--mascot ID --name NAME
--template ID # Optional: create from a template
masko canvas get # Get canvas details and generation status
--mascot ID --canvas ID
masko canvas extend # Safely append/patch graph parts
--mascot ID --canvas ID
--nodes-json JSON_ARRAY
--edges-json JSON_ARRAY
--update-edges-json JSON_ARRAY
--inputs-json JSON_ARRAY
masko canvas edge # Patch one edge
--mascot ID --canvas ID --edge EDGE_ID --speed N
masko canvas delete # Delete a canvas
--mascot ID --canvas ID
masko canvas generate-all # Generate pending canvas images and animations
--mascot ID --canvas ID
--duration N # Seconds per animation (default 4)
--targets all|images|animations # Generate node images, edge animations, or both
--skip-completed true # Deprecated; assigned animations are always skippedUtilities
masko credits # Check credit balance
masko styles # List all 38 art styles
masko projects create --name X # Create a project
masko projects list # List projects
masko assets list # List assets
--mascot ID --item ID --type TYPE --limit N
masko assets get ID # Get one asset
masko assets delete ID # Archive one asset
masko scene suggest # Suggested 4K scene ideas
--mascot ID --aspect 4:3|1:1|21:9|4:5|3:4|9:16 --count N
masko scene generate # Generate a scene image
--mascot ID --scene TEXT --action TEXT --aspect 4:3 --wait
masko scene edit # Edit an existing scene
--mascot ID --source ASSET_ID --instructions TEXT --wait
masko analyze # Analyze an image or website
--type image|url --image-url URL --url URLOutput Formats
By default, the CLI shows human-readable output. Add --json for raw JSON (useful for piping or when AI agents parse the output):
# Human-readable
masko credits
# Total: 14678
# Subscription: 0
# Top-up: 14678
# JSON
masko credits --json
# {"data":{"subscription":0,"topup":14678,"total":14678}}CDN URLs
Every generate command returns CDN URLs immediately - before the file is ready. These URLs serve a branded placeholder that swaps to the real file automatically when generation completes.
masko generate --mascot ID --type image --name "Wave" --prompt "waving" --wait
# Output:
# CDN URLs (usable immediately):
# image: https://assets.masko.ai/abc123/my-mascot/wave-d017.png
# transparent_image: https://assets.masko.ai/abc123/my-mascot/wave-1b2c.pngEmbed these URLs in your code right away. No need to wait.
Animation Tips
From scratch (21 credits for 4s): --prompt sets both the pose and the motion. Use --image-prompt and --animation-prompt separately if you want different descriptions.
# Simple (same description for pose and motion)
masko generate --mascot ID --type animation --name "Wave" --prompt "waving hello" --duration 4 --wait
# Specific (different pose vs motion)
masko generate --mascot ID --type animation \
--name "Wave" \
--image-prompt "standing with right hand raised" \
--animation-prompt "waving hand back and forth" \
--duration 4 --waitFrom existing image (20 credits, saves 1): Pass --item and the source image is auto-resolved.
masko generate --mascot ID --type animation --item ITEM_ID --prompt "breathing gently" --duration 4 --waitAnimations loop by default. The current CLI can pass --loop true; use the API or MCP tool if you need loop: false.
Credit Costs
| Type | Cost |
|---|---|
| Image | 1 credit |
| Animation | 5 credits/second |
| Edit | 1 credit |
| Logo | 5 credits |
Free: background removal, format conversion (webm/hevc), size variants.