How to generate AI images from the terminal with the Picsart CLI
Learn to generate still images using Flux, Recraft, Nano Banana, and other models with aspect ratio and style control. Cover artwork is an AI-generated illustration for the fictional TERMPEACH campaign.
- Category: SKILLS
- Reading time: 6 min
- Difficulty: Beginner
What you'll learn
- Pick the right image model for photorealism vs. vector graphics
- Control aspect ratios for social media and web formats
- Generate multiple variations in one command
- Save outputs to custom directories

Generate AI images step by step
STEP 1: Open the CLI
- On web: Go to picsart.com/cli → Install if you haven't already
- On mobile: Not applicable — CLI runs in terminal only
STEP 2: Choose your model and aspect ratio
Pick a model and specify dimensions:
- Flux: Best for photorealistic images and product photography
- Recraft: Best for vector-style graphics, logos, and illustrations
- Nano Banana: Fastest generation, good for quick mockups
- Aspect ratio flags: --ar 16:9, --ar 1:1, --ar 9:16, or custom like --ar 4:3

STEP 3: Run the generation
Type gen-ai generate with your prompt, model, and aspect ratio. The CLI creates the image and saves it to your current directory. Add --count to generate multiple variations at once.
STEP 4: Review and export
Check the generated image quality: Not perfect? Generate again with a refined prompt, switch models, or increase --count to get more options.
- Verify the composition matches your prompt description
- Check that aspect ratio is correct for your use case
- Look for visual artifacts or off-brand elements
Tips for best results
Use Flux for realistic product shots
Flux excels at photorealism — skin tones, reflections, shadows, and lighting all look natural. If your prompt describes a real-world scene or product, Flux is the safest choice. Recraft is better for flat, vector-style graphics.
Specify aspect ratio upfront
Don't crop later — generate at the right size from the start. Use --ar 16:9 for blog headers and YouTube thumbnails, --ar 1:1 for Instagram posts, and --ar 9:16 for Stories or TikTok. The model composes the image differently based on the canvas shape.
Generate multiple variations with --count
Add --count 5 or --count 10 to get several takes on the same prompt. You can pick the best one or use all of them for A/B testing. Batch generations run in parallel, so 10 images don't take 10× longer.
Aspect ratio guide
- 16:9YouTube thumbnails, blog headers, presentations
- 1:1Instagram posts, profile pictures, square graphics
- 9:16Instagram Stories, TikTok, mobile-first content
- 4:5Instagram feed optimization, Facebook posts
- 2:3Pinterest pins, vertical web banners
- 21:9Ultrawide desktop wallpapers, cinematic headers
Frequently asked questions
- Flux generates photorealistic images with accurate lighting, textures, and natural compositions. Use it for product photography, portraits, or anything that should look like a real photo. Recraft produces vector-style illustrations with clean lines and flat colors. Use it for logos, icons, infographics, or graphic design assets.
