fal-image-gen

Generate images via fal.ai and BytePlus Seedream APIs. Supports single image, batch parallel, and reference-guided generation. Use when you need to generate a photo, poster, or visual asset from a text prompt or reference images.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "fal-image-gen" with this command: npx skills add PHY041/phy-fal-image-gen

FAL Image Generation

Generate professional images via fal.ai and BytePlus Seedream APIs.

Environment Variables

export FAL_API_KEY="your_fal_api_key"
export BYTEPLUS_API_KEY="your_byteplus_api_key"  # for Seedream backend

Model Router

Two backends available. The agent can offer model choice to users, or auto-select based on task.

Backend: fal.ai

TaskModelFlagPrice
Reference-guided (i2i)fal-ai/nano-banana-pro/edit(default when refs provided)$0.15
Text-to-imagefal-ai/flux-2-pro(default when no refs)~$0.05
Poster/Infographic (t2i)fal-ai/nano-banana-pro--model nbp$0.15
Text in imagefal-ai/ideogram/v3

NBP strengths: Best text rendering (5/5), JSON structured prompts, 4K resolution.

Backend: BytePlus Seedream

TaskModelFlagPrice
Text-to-imageseedream-4-5-251128--model seedream$0.03
Reference-guided (i2i)seedream-4-5-251128--model seedream --refs ...$0.03

Seedream strengths: 5x cheaper, up to 14 reference images, natural color rendering with proper prompting.

Model Aliases

AliasRoutes to
seedream, byteplus, sdBytePlus Seedream
nbp, nano-banana-pro, posterfal.ai NBP t2i
flux, flux-2-profal.ai Flux

Auto-Selection Logic

User specifies model → use that model
No model specified → BytePlus Seedream (DEFAULT — $0.03, best photo quality)
"--model nbp" or "--model poster" → fal.ai NBP (when text rendering is critical)
"--model flux" → fal.ai Flux (fast t2i fallback)
"--model fal" → fal.ai default routing (NBP for refs, Flux for no refs)

Why Seedream default: 5x cheaper ($0.03 vs $0.15), supports up to 14 refs, excellent photo realism, proper aspect ratio control (1920x2400 for 4:5, etc.).

Desaturation (per-model)

Each backend needs different color control:

  • Seedream → Lighting-based or Magazine editorial description
  • NBP → Kodak Portra 400 analog film description

Script Usage

Place the generation script at {baseDir}/skills/fal-image-gen/scripts/generate.py.

Single Image

uv run {baseDir}/skills/fal-image-gen/scripts/generate.py \
  --prompt "A mountain temple at golden hour, low angle, 24mm f/8..." \
  --aspect-ratio 9:16 \
  --output {baseDir}/output/

With Reference Images

uv run {baseDir}/skills/fal-image-gen/scripts/generate.py \
  --prompt "..." \
  --refs "https://img1.jpg" "https://img2.jpg" \
  --aspect-ratio 4:5

Seedream (BytePlus) — Text-to-Image

uv run {baseDir}/skills/fal-image-gen/scripts/generate.py \
  --prompt "Travel poster with dramatic mountain scenery..." \
  --model seedream \
  --output {baseDir}/output/

Seedream (BytePlus) — With Reference Images

uv run {baseDir}/skills/fal-image-gen/scripts/generate.py \
  --prompt "Using this poster layout, create..." \
  --model seedream \
  --refs "https://example.com/ref1.jpg" "https://example.com/ref2.jpg" \
  --output {baseDir}/output/

Poster Mode — NBP (JSON Structured Prompt)

uv run {baseDir}/skills/fal-image-gen/scripts/generate.py \
  --prompt '{"meta":{...},"poster_structure":{...},"design_style":{...}}' \
  --model nano-banana-pro \
  --aspect-ratio 3:4 \
  --output {baseDir}/output/

Batch Parallel (from JSON)

uv run {baseDir}/skills/fal-image-gen/scripts/generate.py \
  --prompts-json batch.json \
  --output {baseDir}/output/

JSON format for batch (mix models freely):

[
  {"prompt": "...", "refs": ["url1", "url2"], "aspect_ratio": "9:16", "label": "scene_a"},
  {"prompt": "...", "model": "seedream", "refs": ["url1"], "label": "scene_b"},
  {"prompt": "{...json...}", "model": "nano-banana-pro", "label": "poster"}
]

Output

  • Images saved to output/YYYY-MM-DD/ with descriptive filenames
  • Prints MEDIA: /path/to/image.png for gateway delivery
  • Each MEDIA: line triggers the gateway to send the image

Aspect Ratio Guide

PlatformRatioNotes
Xiaohongshu / Stories9:16Vertical full-screen
Instagram Feed (2026)3:4New optimal — taller than 4:5, more screen real estate
Instagram Feed (legacy)4:5Still supported, less tall
Instagram Carousel3:4Mixed carousels = highest engagement (2.33%)
Banner / Website16:9Landscape
Square1:1Generic / WeChat Moments
Poster (default)3:4Best for designed travel posters

Limits

BackendMax refsSpeedCost
BytePlus Seedream14~15-40s$0.03/img
fal.ai NBP4~15-25s$0.15/img
fal.ai Flux0~5-10s~$0.05/img
  • Batch: generates all images in parallel (async), can mix backends
  • BytePlus URLs expire after 24 hours — script auto-uploads to fal.ai storage for permanent URLs

Resolution Tiers (Seedream)

Use --resolution flag (or "resolution" key in batch JSON):

TierPixels (4:5)TotalBest For
standard1920x2400~4.6MSocial media, fast generation
high (default)2560x3200~8MDownload, zoom, high quality
max3200x4000~12.8MPrint, ultra-high quality

API limits: min 3,686,400 px, max 16,777,216 px.

# Standard (fast, social media)
uv run generate.py --prompt "..." --resolution standard

# High (default)
uv run generate.py --prompt "..."

# Max (print quality)
uv run generate.py --prompt "..." --resolution max

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.

General

Image Gen

Generate images using multiple AI models — Midjourney (via Legnext.ai), Flux, Nano Banana Pro (Gemini), Ideogram, Recraft, and more via fal.ai. Intelligently...

Registry SourceRecently Updated
21.3K
Profile unavailable
Automation

图像生成 / Image Generation

Image Generation via Coze | 基于 Coze 的图像生成技能 Generate images using Coze workflows. 使用 Seedream 4.5 model. Handles parameter building and result parsing. 负责参数构...

Registry SourceRecently Updated
099
Profile unavailable
Automation

AI Image

Full AI image creation workflow — intent classification, prompt enhancement, multi-direction generation via fal.ai, and error recovery. Triggers on "generate...

Registry SourceRecently Updated
0109
Profile unavailable