← Back to Skills Marketplace
ricanwarfare

Fal.ai API

by ricanwarfare · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ Security Clean
127
Downloads
0
Stars
1
Active Installs
3
Versions
Install in OpenClaw
/install fal-api
Description
Fal.Ai Media Generation — Generate images, videos, and audio via fal.ai API (FLUX, SDXL, Whisper, etc.)
README (SKILL.md)

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

Model Endpoint Type
flux-schnell fal-ai/flux/schnell Image (fast)
flux-dev fal-ai/flux/dev Image
flux-pro fal-ai/flux-pro/v1.1-ultra Image (2K)
fast-sdxl fal-ai/fast-sdxl Image
recraft-v3 fal-ai/recraft-v3 Image
sd35-large fal-ai/stable-diffusion-v35-large Image
minimax-video fal-ai/minimax-video/image-to-video Video
wan-video fal-ai/wan/v2.1/1.3b/text-to-video Video
whisper fal-ai/whisper Audio

For the full list, run:

python3 fal_api.py --list-models

Parameters

Parameter Type Default Description
prompt str required Image/video description
model str "flux-dev" Model name from table above
image_size str "landscape_16_9" Preset: square, portrait_4_3, landscape_16_9, etc.
num_images int 1 Number of images to generate
seed int None Random seed for reproducibility
guidance_scale float None CFG scale (how closely to follow prompt)
num_inference_steps int None Inference steps (higher = more detail, slower)
steps int None CLI 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)
Usage Guidance
This skill appears to be a straightforward client for fal.ai and is coherent with its description, but before installing: 1) Verify you trust the skill source — the package has no homepage and the registry owner is an ID only; 2) Confirm the network endpoints (https://queue.fal.run) are legitimate for fal.ai in your environment; 3) Because it will call out to the network and requires your FAL_KEY, prefer an API key with limited scope/ephemeral creds if the service supports them; 4) Note the script may invoke the local 'clawdbot' command to read saved config if FAL_KEY is not set — if you have clawdbot installed, inspect its config and consider running the script in an isolated environment; 5) If you need higher assurance, review the bundled fal_api.py source (it’s included) or run it in a sandbox before giving production credentials.
Capability Analysis
Type: OpenClaw Skill Name: fal-api Version: 1.1.0 The fal-api skill is a standard API wrapper for the fal.ai media generation service. It uses Python's standard library (urllib) to interact with official endpoints (queue.fal.run) and includes a helper method to retrieve configuration via the 'clawdbot' CLI tool. The code in fal_api.py and the instructions in SKILL.md are well-structured, lack external dependencies, and show no signs of malicious intent, data exfiltration, or prompt injection.
Capability Tags
cryptocan-make-purchases
Capability Assessment
Purpose & Capability
Name/description match the code and SKILL.md. The only declared secret is FAL_KEY which is required to call fal.ai endpoints; no unrelated credentials or system-wide accesses are requested. One implementation detail to note: the client sends requests to a queue host at https://queue.fal.run rather than a top-level fal.ai domain — this may be the provider's queue endpoint but is worth verifying if you need absolute provenance.
Instruction Scope
SKILL.md instructs only to set FAL_KEY and use the provided CLI/Python API. The code performs HTTP calls to the queue endpoint and polls for job status. It also tries to read clawdbot config by running a local subprocess ('clawdbot config get ...') as a fallback when the env var is absent; this matches SKILL.md references to clawdbot config but means the script may invoke that local tool if present.
Install Mechanism
No install spec — instruction-only with bundled Python file. Nothing is downloaded or installed by an automated installer, so there is no external install URL or archive to audit.
Credentials
Requires only one environment variable (FAL_KEY) and that is the declared primary credential. The code does not request additional secrets or config paths beyond optionally calling clawdbot to read a stored key.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide settings. It runs as a client library / CLI only when invoked.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install fal-api
  3. After installation, invoke the skill by name or use /fal-api
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
Synced from openclaw-skills repo
v1.0.1
Renamed to Fal.Ai Media Generation. Updated title and description.
v1.0.0
Initial release. Features: FLUX/SDXL/Recraft image generation, video generation, Whisper transcription, queue-based async API, robust error handling, guidance_scale and inference_steps parameters, stdlib-only dependencies.
Metadata
Slug fal-api
Version 1.1.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 3
Frequently Asked Questions

What is Fal.ai API?

Fal.Ai Media Generation — Generate images, videos, and audio via fal.ai API (FLUX, SDXL, Whisper, etc.). It is an AI Agent Skill for Claude Code / OpenClaw, with 127 downloads so far.

How do I install Fal.ai API?

Run "/install fal-api" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Fal.ai API free?

Yes, Fal.ai API is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Fal.ai API support?

Fal.ai API is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Fal.ai API?

It is built and maintained by ricanwarfare (@ricanwarfare); the current version is v1.1.0.

💬 Comments