fal-api

Fal.Ai Media Generation — Generate images, videos, and audio via fal.ai API (FLUX, SDXL, Whisper, etc.)

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-api" with this command: npx skills add ricanwarfare/fal-api

Fal.Ai Media Generation

Generate images, videos, and transcripts using fal.ai's API with support for FLUX, Stable Diffusion, Whisper, and more.

Features

  • Queue-based async generation (submit → poll → result)
  • Support for 600+ AI models
  • Image generation (FLUX, SDXL, Recraft)
  • Video generation (MiniMax, WAN)
  • Speech-to-text (Whisper)
  • Robust error handling with clear messages
  • Stdlib-only dependencies (no external packages)

Setup

  1. Get your API key from https://fal.ai/dashboard/keys
  2. Configure with:
export FAL_KEY="your-api-key"

Or via clawdbot config:

clawdbot config set skill.fal_api.key YOUR_API_KEY

Usage

Interactive Mode

You: Generate a cyberpunk cityscape with FLUX
clawd: Creates the image and returns the URL

CLI

# Basic image generation
python3 fal_api.py --prompt "A cyberpunk cityscape" --model flux-schnell

# High-quality with custom settings
python3 fal_api.py --prompt "A sunset over mountains" --model flux-dev \
    --guidance-scale 5.0 --steps 20

# Reproducible (same seed = same image)
python3 fal_api.py --prompt "A robot" --seed 12345

# List available models
python3 fal_api.py --list-models

Python Script

from fal_api import FalAPI

api = FalAPI()

# Generate and wait
urls = api.generate_and_wait(
    prompt="A serene Japanese garden",
    model="flux-dev"
)
print(urls)

Available Models

ModelEndpointType
flux-schnellfal-ai/flux/schnellImage (fast)
flux-devfal-ai/flux/devImage
flux-profal-ai/flux-pro/v1.1-ultraImage (2K)
fast-sdxlfal-ai/fast-sdxlImage
recraft-v3fal-ai/recraft-v3Image
sd35-largefal-ai/stable-diffusion-v35-largeImage
minimax-videofal-ai/minimax-video/image-to-videoVideo
wan-videofal-ai/wan/v2.1/1.3b/text-to-videoVideo
whisperfal-ai/whisperAudio

For the full list, run:

python3 fal_api.py --list-models

Parameters

ParameterTypeDefaultDescription
promptstrrequiredImage/video description
modelstr"flux-dev"Model name from table above
image_sizestr"landscape_16_9"Preset: square, portrait_4_3, landscape_16_9, etc.
num_imagesint1Number of images to generate
seedintNoneRandom seed for reproducibility
guidance_scalefloatNoneCFG scale (how closely to follow prompt)
num_inference_stepsintNoneInference steps (higher = more detail, slower)
stepsintNoneCLI alias for num_inference_steps

CLI Examples

# Basic image
python fal_api.py --prompt "A sunset over mountains" --model flux-schnell

# High-quality with custom settings
python fal_api.py --prompt "A cyberpunk city" --model flux-dev \
    --guidance-scale 5.0 --steps 20

# Reproducible (same seed = same image)
python fal_api.py --prompt "A robot" --seed 12345

Error Handling

The skill provides clear error messages for common issues:

  • 401 Unauthorized → Invalid API key
  • 429 Rate Limit → Wait and retry
  • 402 Payment Required → Insufficient credits

Requirements

  • Python 3.7+
  • No external dependencies (uses stdlib only)

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

Gigo Lobster Resume

🦞 GIGO · gigo-lobster-resume: 续跑入口:v2 stable 当前会清理旧 checkpoint 并从头重跑;保留此 slug 作为旧 checkpoint 兼容入口。 Triggers: 继续试吃 / 恢复评测 / resume tasting / continue lobster...

Registry SourceRecently Updated
General

YiHui CONTEXT MODE

context-mode is an MCP server that saves 98% of your context window by sandboxing tool outputs. It routes large file reads, shell outputs, and web fetches th...

Registry SourceRecently Updated
General

xinyi-drink

Use when users ask about 新一好喝/新一咖啡 drinks, stores, menu, activities, Skill用户大礼包, today drink recommendations, afternoon tea, feeling sleepy, or personalized...

Registry SourceRecently Updated
General

vedic-destiny

吠陀命盘分析中文入口。用于完整命盘研判、命主盘 Rashi chart 与九分盘 Navamsha chart 联读、既往事件回看、出生时间稳定度判断、事业主题、婚姻主题、时空盘专题,以及基于 Jagannatha Hora PDF、星盘截图或文本命盘数据的系统拆盘。当用户提到完整星盘、事业方向、婚姻问题、关系窗...

Registry SourceRecently Updated