AI Media Studio/ Docs
GitHubGet API key
API ReferenceCLIMCPSkills
CLI

The aims command line

Install once, authenticate with your API key, and generate images and videos straight from your terminal or scripts.

1

Install

npm install -g @ai-media-studio/cli
2

Log in

Pass your aims_ key (from Workspace Settings → API). It is stored at ~/.aims/config.json. You can also set AIMS_API_KEY or pass --key per command. Agents should always use aims login --key — without a key the command exits instead of prompting.

aims login --key aims_xxx
3

Generate an image

aims image "a red panda astronaut, studio lighting" \
  --model fal-ai/nano-banana-pro \
  --aspect-ratio 16:9 \
  --json
4

Edit an image (image-to-image)

Upload your source image with a key that has the media:write scope, then use its returned URL. Uploads accept raster images up to 20 MiB. References must belong to this workspace or use supported Fal or Shopify hosts.

aims upload ./photo.png --print url

aims edit "make it a night scene with neon" \
  --image-url UPLOADED_IMAGE_URL \
  --json
5

Generate a video

Video credits are charged per second — keep clips short to control cost.

aims video "drone shot over snowy mountains at sunrise" \
  --model fal-ai/kling-video/o3/pro/text-to-video \
  --duration 6 \
  --json

Account & discovery

aims whoami --json
aims models --type image --json
aims image "a red panda astronaut" --dry-run --json

Run aims --help or aims <command> --help for examples. Use --json for machine-readable output, --print url to print only result URLs, and --dry-run to preview a request without spending credits.

Failed or partial generations exit with code 1 while preserving the full JSON result or completed URLs. Download failures also preserve generated URLs, so you can retry downloading without generating again. For video frames, use --first-frame-url and --last-frame-url. Use --extend-video-url for extension models and repeated --image-urls flags for reference images.

Generate images and videos with AI agents. liebhardt-io/aims-agent