fal-generate by fal-ai-community/skills
npx skills add https://github.com/fal-ai-community/skills --skill fal-generate使用 fal.ai 上最先进的 AI 模型生成图像和视频。
| 脚本 | 用途 |
|---|---|
generate.sh | 生成图像/视频(基于队列) |
upload.sh | 将本地文件上传到 fal CDN |
search-models.sh | 搜索和发现模型 |
get-schema.sh | 获取任何模型的 OpenAPI 模式 |
所有请求默认使用队列系统以确保可靠性:
用户请求 → 队列提交 → 轮询状态 → 获取结果
↓
request_id
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
优势:
bash /mnt/skills/user/fal-generate/scripts/generate.sh [选项]
# 图像 - 提交到队列,等待完成
bash generate.sh --prompt "宁静的山景" --model "fal-ai/nano-banana-pro"
# 视频 - 同上,但耗时更长
bash generate.sh --prompt "海浪拍岸" --model "fal-ai/veo3.1"
# 图像转视频
bash generate.sh \
--prompt "镜头缓慢推近" \
--model "fal-ai/kling-video/v2.6/pro/image-to-video" \
--image-url "https://example.com/image.jpg"
对于长时间的视频任务,使用 --async 立即获取 request_id:
# 提交并立即返回
bash generate.sh --prompt "史诗般的战斗场景" --model "fal-ai/veo3.1" --async
# 输出:
# 请求 ID: abc123-def456
# 请求已提交。使用以下命令检查:
# 状态: ./generate.sh --status "abc123-def456" --model "fal-ai/veo3.1"
# 结果: ./generate.sh --result "abc123-def456" --model "fal-ai/veo3.1"
# 检查状态
bash generate.sh --status "request_id" --model "fal-ai/veo3.1"
# → IN_QUEUE (位置: 3) | IN_PROGRESS | COMPLETED
# 获取结果(当状态为 COMPLETED 时)
bash generate.sh --result "request_id" --model "fal-ai/veo3.1"
# 取消(仅当仍在队列中时)
bash generate.sh --cancel "request_id" --model "fal-ai/veo3.1"
bash generate.sh --prompt "日落" --model "fal-ai/nano-banana-pro" --logs
# 状态: IN_QUEUE (位置: 2)
# 状态: IN_PROGRESS
# > 正在加载模型...
# > 正在生成图像...
# 状态: COMPLETED
# 本地文件会自动上传到 fal CDN
bash generate.sh \
--file "/path/to/photo.jpg" \
--model "fal-ai/kling-video/v2.6/pro/image-to-video" \
--prompt "镜头缓慢推近"
# 先上传
URL=$(bash upload.sh --file "/path/to/photo.jpg")
# → https://v3.fal.media/files/xxx/photo.jpg
# 然后生成
bash generate.sh --image-url "$URL" --model "..." --prompt "..."
# 任何公开的 URL 都有效
bash generate.sh --image-url "https://example.com/image.jpg" ...
支持的文件类型:
上传流程(两步):
1. POST rest.alpha.fal.ai/storage/auth/token?storage_type=fal-cdn-v3
→ {"token": "...", "base_url": "https://v3b.fal.media"}
2. POST {base_url}/files/upload
Authorization: Bearer {token}
→ {"access_url": "https://v3b.fal.media/files/..."}
最大文件大小: 100MB(简单上传)
| 参数 | 描述 | 默认值 |
|---|---|---|
--prompt, -p | 文本描述 | (必需) |
--model, -m | 模型 ID | fal-ai/nano-banana-pro |
--image-url | 用于 I2V 的输入图像 URL | - |
--file, --image | 本地文件(自动上传) | - |
--size | square, portrait, landscape | landscape_4_3 |
--num-images | 图像数量 | 1 |
模式选项:
| 参数 | 描述 |
|---|---|
| (默认) | 队列模式 - 提交并轮询直到完成 |
--async | 提交到队列,立即返回 request_id |
--sync | 同步模式(不推荐用于视频) |
--logs | 在轮询时显示生成日志 |
队列操作:
| 参数 | 描述 |
|---|---|
--status ID | 检查排队请求的状态 |
--result ID | 获取已完成请求的结果 |
--cancel ID | 取消排队请求 |
高级选项:
| 参数 | 描述 | 默认值 |
|---|---|---|
--poll-interval | 状态检查间隔秒数 | 2 |
--timeout | 最大等待秒数 | 600 |
--lifecycle N | 对象过期秒数 | - |
--schema [MODEL] | 获取 OpenAPI 模式 | - |
要发现最佳和最新的模型,请使用搜索 API:
# 按类别搜索
bash search-models.sh --category "text-to-image"
bash search-models.sh --category "text-to-video"
bash search-models.sh --category "image-to-video"
# 按关键词搜索
bash search-models.sh --query "flux"
bash search-models.sh --query "kling video"
或者使用带有相关关键词的 search_models MCP 工具。
类别: text-to-image, image-to-image, text-to-video, image-to-video, text-to-speech, speech-to-text
重要: 获取模式以查看任何模型的确切参数。
# 获取模式
bash get-schema.sh --model "fal-ai/nano-banana-pro"
# 仅显示输入参数
bash get-schema.sh --model "fal-ai/kling-video/v2.6/pro/image-to-video" --input
# 通过 generate.sh 快速获取模式
bash generate.sh --schema "fal-ai/veo3.1"
API 端点:
https://fal.ai/api/openapi/queue/openapi.json?endpoint_id={model-id}
队列提交响应:
{
"request_id": "abc123-def456",
"status": "IN_QUEUE",
"response_url": "https://queue.fal.run/.../requests/abc123-def456",
"status_url": "https://queue.fal.run/.../requests/abc123-def456/status",
"cancel_url": "https://queue.fal.run/.../requests/abc123-def456/cancel"
}
最终结果:
{
"images": [{ "url": "https://v3.fal.media/files/...", "width": 1024, "height": 768 }]
}
图像:

• 1024×768 | 生成耗时 2.2 秒
视频:
[点击查看视频](https://v3.fal.media/files/.../video.mp4)
• 时长: 5 秒 | 生成耗时 45 秒
异步提交:
请求已提交到队列。
• 请求 ID: abc123-def456
• 模型: fal-ai/veo3
• 检查状态: --status "abc123-def456"
控制生成的文件可访问的时间长度:
# 文件在 1 小时(3600 秒)后过期
bash generate.sh --prompt "..." --lifecycle 3600
# 文件在 24 小时后过期
bash generate.sh --prompt "..." --lifecycle 86400
错误: 600 秒后超时
请求 ID: abc123-def456
解决方案: 使用 --status 和 --result 手动检查,或增加 --timeout。
错误: 未设置 FAL_KEY
解决方案: 运行 ./generate.sh --add-fal-key 或 export FAL_KEY=your_key。
前往 claude.ai/settings/capabilities 并将 *.fal.ai 添加到允许的域名。
每周安装次数
202
仓库
GitHub 星标数
39
首次出现
2026 年 1 月 27 日
安全审计
安装于
opencode172
codex168
gemini-cli166
github-copilot159
cursor145
amp142
Generate images and videos using state-of-the-art AI models on fal.ai.
| Script | Purpose |
|---|---|
generate.sh | Generate images/videos (queue-based) |
upload.sh | Upload local files to fal CDN |
search-models.sh | Search and discover models |
get-schema.sh | Get OpenAPI schema for any model |
All requests use the queue system by default for reliability:
User Request → Queue Submit → Poll Status → Get Result
↓
request_id
Benefits:
bash /mnt/skills/user/fal-generate/scripts/generate.sh [options]
# Image - submits to queue, waits for completion
bash generate.sh --prompt "A serene mountain landscape" --model "fal-ai/nano-banana-pro"
# Video - same, but takes longer
bash generate.sh --prompt "Ocean waves crashing" --model "fal-ai/veo3.1"
# Image-to-Video
bash generate.sh \
--prompt "Camera slowly zooms in" \
--model "fal-ai/kling-video/v2.6/pro/image-to-video" \
--image-url "https://example.com/image.jpg"
For long video jobs, use --async to get request_id immediately:
# Submit and return immediately
bash generate.sh --prompt "Epic battle scene" --model "fal-ai/veo3.1" --async
# Output:
# Request ID: abc123-def456
# Request submitted. Use these commands to check:
# Status: ./generate.sh --status "abc123-def456" --model "fal-ai/veo3.1"
# Result: ./generate.sh --result "abc123-def456" --model "fal-ai/veo3.1"
# Check status
bash generate.sh --status "request_id" --model "fal-ai/veo3.1"
# → IN_QUEUE (position: 3) | IN_PROGRESS | COMPLETED
# Get result (when COMPLETED)
bash generate.sh --result "request_id" --model "fal-ai/veo3.1"
# Cancel (only if still queued)
bash generate.sh --cancel "request_id" --model "fal-ai/veo3.1"
bash generate.sh --prompt "A sunset" --model "fal-ai/nano-banana-pro" --logs
# Status: IN_QUEUE (position: 2)
# Status: IN_PROGRESS
# > Loading model...
# > Generating image...
# Status: COMPLETED
# Local file is automatically uploaded to fal CDN
bash generate.sh \
--file "/path/to/photo.jpg" \
--model "fal-ai/kling-video/v2.6/pro/image-to-video" \
--prompt "Camera zooms in slowly"
# Upload first
URL=$(bash upload.sh --file "/path/to/photo.jpg")
# → https://v3.fal.media/files/xxx/photo.jpg
# Then generate
bash generate.sh --image-url "$URL" --model "..." --prompt "..."
# Any public URL works
bash generate.sh --image-url "https://example.com/image.jpg" ...
Supported file types:
Upload flow (two-step):
1. POST rest.alpha.fal.ai/storage/auth/token?storage_type=fal-cdn-v3
→ {"token": "...", "base_url": "https://v3b.fal.media"}
2. POST {base_url}/files/upload
Authorization: Bearer {token}
→ {"access_url": "https://v3b.fal.media/files/..."}
Max file size: 100MB (simple upload)
| Argument | Description | Default |
|---|---|---|
--prompt, -p | Text description | (required) |
--model, -m | Model ID | fal-ai/nano-banana-pro |
--image-url | Input image URL for I2V | - |
--file, |
Mode Options:
| Argument | Description |
|---|---|
| (default) | Queue mode - submit and poll until complete |
--async | Submit to queue, return request_id immediately |
--sync | Synchronous (not recommended for video) |
--logs | Show generation logs while polling |
Queue Operations:
| Argument | Description |
|---|---|
--status ID | Check status of a queued request |
--result ID | Get result of a completed request |
--cancel ID | Cancel a queued request |
Advanced:
| Argument | Description | Default |
|---|---|---|
--poll-interval | Seconds between status checks | 2 |
--timeout | Max seconds to wait | 600 |
--lifecycle N | Object expiration in seconds | - |
--schema [MODEL] | Get OpenAPI schema | - |
To discover the best and latest models, use the search API:
# Search by category
bash search-models.sh --category "text-to-image"
bash search-models.sh --category "text-to-video"
bash search-models.sh --category "image-to-video"
# Search by keyword
bash search-models.sh --query "flux"
bash search-models.sh --query "kling video"
Or use the search_models MCP tool with relevant keywords.
Categories: text-to-image, image-to-image, text-to-video, image-to-video, text-to-speech, speech-to-text
IMPORTANT: Fetch schema to see exact parameters for any model.
# Get schema
bash get-schema.sh --model "fal-ai/nano-banana-pro"
# Show only input parameters
bash get-schema.sh --model "fal-ai/kling-video/v2.6/pro/image-to-video" --input
# Quick schema via generate.sh
bash generate.sh --schema "fal-ai/veo3.1"
API Endpoint:
https://fal.ai/api/openapi/queue/openapi.json?endpoint_id={model-id}
Queue Submit Response:
{
"request_id": "abc123-def456",
"status": "IN_QUEUE",
"response_url": "https://queue.fal.run/.../requests/abc123-def456",
"status_url": "https://queue.fal.run/.../requests/abc123-def456/status",
"cancel_url": "https://queue.fal.run/.../requests/abc123-def456/cancel"
}
Final Result:
{
"images": [{ "url": "https://v3.fal.media/files/...", "width": 1024, "height": 768 }]
}
Images:

• 1024×768 | Generated in 2.2s
Videos:
[Click to view video](https://v3.fal.media/files/.../video.mp4)
• Duration: 5s | Generated in 45s
Async Submission:
Request submitted to queue.
• Request ID: abc123-def456
• Model: fal-ai/veo3
• Check status: --status "abc123-def456"
Control how long generated files remain accessible:
# Files expire after 1 hour (3600 seconds)
bash generate.sh --prompt "..." --lifecycle 3600
# Files expire after 24 hours
bash generate.sh --prompt "..." --lifecycle 86400
Error: Timeout after 600s
Request ID: abc123-def456
Solution: Use --status and --result to check manually, or increase --timeout.
Error: FAL_KEY not set
Solution: Run ./generate.sh --add-fal-key or export FAL_KEY=your_key.
Go to claude.ai/settings/capabilities and add *.fal.ai to allowed domains.
Weekly Installs
202
Repository
GitHub Stars
39
First Seen
Jan 27, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode172
codex168
gemini-cli166
github-copilot159
cursor145
amp142
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
62,200 周安装
MoE训练专家混合模型教程:降低5倍成本实现SOTA模型(Mixtral/DeepSeek)
197 周安装
Perplexity AI搜索工具使用指南 - 精准选择Search/Ask/研究代理,提升开发效率
197 周安装
滚动体验设计指南:GSAP、Framer Motion与CSS实现视差动画与交互式叙事
197 周安装
React Native 项目架构与最佳实践指南 | 函数式组件、状态管理、TypeScript
197 周安装
Auth0 React Native 集成指南:为移动应用快速添加身份验证功能
197 周安装
policy-lookup:AI 公司政策查询工具,快速解答员工福利、休假、薪酬等 HR 问题
197 周安装
--image| Local file (auto-uploads) |
| - |
--size | square, portrait, landscape | landscape_4_3 |
--num-images | Number of images | 1 |