Masonry Logo
$_Masonry CLI

AI images & videos
from your terminal

Built for Claude Code and AI coding assistants. Access Veo, FLUX, Imagen, Kling, and 50+ more models.

macOS and Linux • Requires a free Masonry account

How it works

Your AI assistant generates images for you

Just describe what you need. Claude Code runs the CLI and delivers the result.

Claude Code
U

Generate a hero image for my landing page - a futuristic city at sunset with flying cars

C

I'll generate that image using the Masonry CLI with FLUX for best quality.

$ masonry image "futuristic city at sunset, flying cars, cyberpunk aesthetic, cinematic lighting" --model flux-2-pro --aspect 16:9

✓ Job started: img_8x7k2m

✓ Downloading to ./futuristic-city.png

✓ Done! Saved to futuristic-city.png

Generated futuristic city

Here's your hero image! I used FLUX 2 Pro for the best photorealistic quality. Want me to try a different style or aspect ratio?

Two commands. That's it.

masonry image and masonry video

Generate an image
$masonryimage"neon cyberpunk street at night"

Using model: imagen-4.0-generate-001

Generating image...

Saved to cyberpunk-street.png

Generate a video
$masonryvideo"ocean waves at golden hour"

Using model: veo-3.1-generate-preview

Duration: 5 seconds

Generating video...

Saved to ocean-waves.mp4

Use a specific model
$masonryimage"..."--model flux-2-pro

Using model: flux-2-pro

Generating image...

Saved to output.png

Animate an image
$masonryvideo--image ./photo.png

Input: ./photo.png

Using model: kling-v2-6-pro-i2v

Generating video...

Saved to photo-animated.mp4

Plus --model, --aspect, --dimension, --output, and more. Run masonry --help for everything.

50+ models, one CLI

Access every major AI image and video model

Frequently asked questions

Masonry CLI generates AI images and video from your terminal across 50+ models, including Veo 3, FLUX, Imagen 4, and GPT Image 2. It works with Claude Code and other AI coding agents, so an agent can create an asset mid-session without leaving the terminal.

Can Claude Code generate images?
Not on its own. Claude Code is a text coding agent with no built-in image model. With the Masonry CLI installed, you can ask it to generate an image in plain language and it runs the command for you, saving the file into your project.
How do I generate an image from the terminal?
Install the CLI with npx @masonryai/cli, run masonry login to connect your account, then run masonry image "your prompt". The image saves to your current directory. Use masonry video "your prompt" for video.
Which AI models does the Masonry CLI support?
Over 50 image and video models, including Veo 3, FLUX, Imagen 4, GPT Image 2, Nano Banana, Kling, and Seedance. Pick one with the --model flag, or use the default.
Do I need an API key?
No raw provider keys. You authenticate once with masonry login, which connects the CLI to your Masonry account, and generations draw from your account balance.
Does it work with other AI coding assistants, not just Claude Code?
Yes. The CLI is a normal shell command, so any agent or tool that can run shell commands, or a project skill that wraps it, can call it. No special integration is required.
What can I control on a generation?
Model (--model), aspect ratio (--aspect), dimensions (--dimension), and output path (--output), plus more. Run masonry --help for the full list.

Get started in seconds

Need an account? Sign up free