ai-image-gen

Generate or edit images using the ai-img CLI with AI SDK (multi-provider: OpenAI, Google, Fal). Use when: (1) Generating images from text prompts, (2) Editing existing images with AI, (3) Batch processing multiple prompts. Requires provider API key (OPENAI_API_KEY, GOOGLE_API_KEY, or FAL_API_KEY). Located at ~/Developer/ai-img.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ai-image-gen" with this command: npx skills add aryasaatvik/ai-img/aryasaatvik-ai-img-ai-image-gen

AI Image Generation Skill

Generate or edit images using the ai-img CLI with Vercel AI SDK.

When to use

  • Generate images from text prompts
  • Edit existing images with AI (inpainting, style transfer)
  • Batch process multiple image generation jobs

Prerequisites

  1. Install CLI:

    # Option 1: Install globally with Bun (recommended)
    bun add -g ai-img
    
    # Option 2: Clone and build
    git clone https://github.com/aryasaatvik/ai-img
    cd ai-img
    bun install
    bun run build
    
  2. Set API key (choose one):

    • OpenAI: export OPENAI_API_KEY=sk-...
    • Google: export GOOGLE_API_KEY=..., export GEMINI_API_KEY=..., or export GOOGLE_GENERATIVE_AI_API_KEY=...
    • FAL AI: export FAL_API_KEY=...

Quick Decision Tree

Image Generation?
├─ Generate new image → ai-img generate
├─ Edit existing image → ai-img edit
└─ Many images at once → ai-img batch

Commands

generate

Generate new images from text prompts.

# Basic
ai-img generate --prompt "A red cat"

# Multiple images
ai-img generate --prompt "A sunset" --count 3

# Specific provider/model
ai-img generate --prompt "A cat" --provider fal --model "fal-ai/flux/dev"

# With size and quality
ai-img generate --prompt "Landscape" --size 1536x1024 --quality high

edit

Edit existing images with AI.

# Basic edit
ai-img edit --input photo.jpg --prompt "Make it vintage"

# With mask (partial edit)
ai-img edit --input photo.jpg --mask mask.png --prompt "Add sunglasses"

# Multiple input images
ai-img edit --input "product.jpg,background.jpg" --prompt "Place product in scene"

batch

Process multiple jobs from JSONL file.

# Create jobs file (one JSON per line)
echo '{"prompt": "A red car", "out": "red-car.png"}
{"prompt": "A blue car", "out": "blue-car.png"}' > jobs.jsonl

# Run batch
ai-img batch --input jobs.jsonl --outDir ./output --concurrency 5

Options Reference

FlagDescriptionDefault
--prompt, -pText promptRequired
--provider, -PAI provider: openai, google, falopenai
--model, -mModel IDProvider default
--size, -sImage size (WxH)1024x1024
--aspectRatioAspect ratio (e.g., 16:9) - for Gemini-
--count, -cNumber of images1
--seedRandom seedRandom
--qualityQuality: low/medium/high/autoauto
--output, -oOutput file pathoutput.png
--outDirOutput directoryCurrent dir

Providers & Models

ProviderDefault ModelEnvironment Variable
OpenAIgpt-image-1.5OPENAI_API_KEY
Googleimagen-3.0-generate-002GOOGLE_API_KEY or GEMINI_API_KEY
FAL AIfal-ai/flux/devFAL_API_KEY

See references/providers.md for full model list.

Prompting Tips

  • Be specific about style: "photorealistic", "oil painting", "3D render"
  • Include composition: "centered", "wide shot", "close-up"
  • Specify mood/lighting: "golden hour", "dramatic shadows", "soft light"
  • Add constraints: "no text", "no logos"

See references/prompting.md for detailed guidance.

Examples

Product Photography

ai-img generate --prompt "White ceramic mug on wooden table, product photography, soft natural light, clean background" --provider openai --size 1024x1024 --quality high

Icon Generation

ai-img generate --prompt "Simple geometric rocket icon, flat design, blue and white, minimal" --provider fal --model "fal-ai/flux/dev" --size 512x512

Background Replacement

ai-img edit --input product.jpg --prompt "Replace background with warm sunset gradient, keep product unchanged" --provider openai

Troubleshooting

  • "Missing API key": Ensure your API key is set in the environment
  • "Invalid model": Check the model ID is valid for the provider
  • Rate limiting: Reduce --concurrency for batch jobs

See references/cli.md for full CLI reference.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated
Coding

clawhub-rate-limited-publisher

Queue and publish local skills to ClawHub with a strict 5-per-hour cap using the local clawhub CLI and host scheduler.

Archived SourceRecently Updated