← 返回 Skills 市场
ricanwarfare

Fal.ai API

作者 ricanwarfare · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ 安全检测通过
127
总下载
0
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install fal-api
功能描述
Fal.Ai Media Generation — Generate images, videos, and audio via fal.ai API (FLUX, SDXL, Whisper, etc.)
使用说明 (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)
安全使用建议
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.
功能分析
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.
能力标签
cryptocan-make-purchases
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install fal-api
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /fal-api 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug fal-api
版本 1.1.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 3
常见问题

Fal.ai API 是什么?

Fal.Ai Media Generation — Generate images, videos, and audio via fal.ai API (FLUX, SDXL, Whisper, etc.). 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 127 次。

如何安装 Fal.ai API?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install fal-api」即可一键安装,无需额外配置。

Fal.ai API 是免费的吗?

是的,Fal.ai API 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Fal.ai API 支持哪些平台?

Fal.ai API 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Fal.ai API?

由 ricanwarfare(@ricanwarfare)开发并维护,当前版本 v1.1.0。

💬 留言讨论