Black Friday: 50% off Ultra annual + Unlimited Seedance 2.5 for 7 days. · Terms apply
50% off Ultra annual + Unlimited Seedance 2.5 for 7 days · Terms applyBlack Friday: 50% off Ultra annual + Unlimited Seedance 2.5 for 7 days. · Terms apply
Describe the video you want to create...

How to generate your first AI image with gen-ai generate

Pick a model, write a prompt, set aspect ratio, and save output in one command — your complete hello-world tutorial.

  • Category: CLI
  • Reading time: 4 min
  • Difficulty: Beginner

What you'll learn

  • Run your first generation command with gen-ai generate
  • Choose between Flux, Recraft, Nano Banana, and 130+ other models
  • Control aspect ratio, output location, and file names
  • Understand what each flag does and when to use it
How to generate your first AI image with gen-ai generate

Generate your first image step by step

  1. STEP 1: Open your terminal

    • On Mac: Open Terminal app from Applications > Utilities
    • On Windows: Open PowerShell or Command Prompt
    Open CLI docs
  2. STEP 2: Choose your model and options

    Decide what you want to generate and pick settings:

    • -m flag: Chooses the AI model (flux-2-pro, recraft-v4, nano-banana-v2, or 130+ others)
    • -p flag: Your text prompt describing what to create
    • --ar flag: Aspect ratio like 16:9, 1:1, 9:16, or 4:3
    • --out flag: Where to save the file (defaults to current directory)
    • Example: gen-ai generate -m flux-2-pro -p "mountain lake at sunset" --ar 16:9
  3. STEP 3: Run the command

    Paste your command and press Enter. The CLI shows a progress indicator while the model generates your image. Most image generations take 10-30 seconds depending on the model. When done, you'll see the file path where your image was saved.

  4. STEP 4: Check your output

    Verify the image matches your expectations: Not what you wanted? Adjust your prompt and generate again — each generation costs credits, so refine your prompt based on what you learn.

    • Open the saved file and check if the style matches your prompt
    • Verify the aspect ratio and resolution meet your needs
    • If the result is close but not perfect, tweak your prompt and regenerate
    Generate more images

Tips for best results

  • Start with Flux or Recraft for general images

    flux-2-pro handles most prompts well and generates fast. recraft-v4 excels at vector-style art and illustrations. nano-banana-v2 is faster and cheaper for simple concepts. Try a few models to see which aesthetic you prefer.

  • Be specific in your prompts

    Instead of "a dog", try "golden retriever puppy playing in grass, sunny day, shallow depth of field". More detail gives the model clearer instructions. Mention style, lighting, composition, and mood for better control.

  • Use --out to organize your files

    Add --out ./images/project-name.png to save outputs in specific folders with custom names. This keeps your workspace organized when generating multiple images. The CLI creates directories automatically if they don't exist.

  • Check pricing before bulk generations

    Run gen-ai pricing to see credit costs per model. Flux costs more than Nano Banana but produces higher quality. If you're generating 50 variations, pick a model that balances quality and budget.

Common aspect ratios

  • 16:9Widescreen format for YouTube thumbnails, presentation slides, and desktop wallpapers
  • 1:1Square format for Instagram posts, profile pictures, and icons
  • 9:16Vertical format for TikTok, Instagram Stories, and mobile-first content
  • 4:3Standard photo ratio for prints and traditional displays
  • 4:5Portrait format for Instagram feed posts and Pinterest pins
  • 2:3Tall portrait for posters, book covers, and vertical prints

Frequently asked questions

  • Start with flux-2-pro — it handles most prompts well and generates photorealistic images fast. Use recraft-v4 for vector art, logos, or illustration styles. Use nano-banana-v2 when you need speed and lower costs for simple concepts. Each model has different strengths, so experiment with a few to find your preferred aesthetic.