Loading...
Loading...
Generate images and videos using fal.ai AI models with queue support. Use when the user requests "Generate image", "Create video", "Make a picture of...", "Text to image", "Image to video", "Search models", or similar generation tasks.
npx skill4agent add fal-ai-community/skills fal-generate| Script | Purpose |
|---|---|
| Generate images/videos (queue-based) |
| Upload local files to fal CDN |
| Search and discover models |
| Get OpenAPI schema for any model |
User Request → Queue Submit → Poll Status → Get Result
↓
request_idbash /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"--async# 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/flux/dev" --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" ...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/..."}| Argument | Description | Default |
|---|---|---|
| Text description | (required) |
| Model ID | |
| Input image URL for I2V | - |
| Local file (auto-uploads) | - |
| | |
| Number of images | 1 |
| Argument | Description |
|---|---|
| (default) | Queue mode - submit and poll until complete |
| Submit to queue, return request_id immediately |
| Synchronous (not recommended for video) |
| Show generation logs while polling |
| Argument | Description |
|---|---|
| Check status of a queued request |
| Get result of a completed request |
| Cancel a queued request |
| Argument | Description | Default |
|---|---|---|
| Seconds between status checks | 2 |
| Max seconds to wait | 600 |
| Object expiration in seconds | - |
| Get OpenAPI schema | - |
| Model | Notes |
|---|---|
| Best overall - T2I and editing |
| Open source, high quality |
| Open source, fast |
| Good balance (default) |
| ~1 second |
| Best for text rendering |
| Model | Notes |
|---|---|
| High quality |
| Fast, good quality |
| OpenAI Sora |
| Fast, reliable |
| Good for characters |
| Model | Notes |
|---|---|
| Best overall |
| Fast, high quality |
| Smooth motion |
| Good balance |
# Search by keyword
bash search-models.sh --query "flux"
# Filter by category
bash search-models.sh --category "text-to-video"text-to-imageimage-to-imagetext-to-videoimage-to-videotext-to-speechspeech-to-text# 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"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 | Generated in 2.2s[Click to view video](https://v3.fal.media/files/.../video.mp4)
• Duration: 5s | Generated in 45sRequest submitted to queue.
• Request ID: abc123-def456
• Model: fal-ai/veo3
• Check status: --status "abc123-def456"# Files expire after 1 hour (3600 seconds)
bash generate.sh --prompt "..." --lifecycle 3600
# Files expire after 24 hours
bash generate.sh --prompt "..." --lifecycle 86400Error: Timeout after 600s
Request ID: abc123-def456--status--result--timeoutError: FAL_KEY not set./generate.sh --add-fal-keyexport FAL_KEY=your_keyclaude.ai/settings/capabilities*.fal.ai