Run FAL Model
Action ID: fal_run_model
Description
Run any model on FAL.ai with your API key. This node allows you to execute machine learning models for image generation, video processing, and other AI tasks with optional streaming support.
Provider
FAL
Connection
FAL Connection
The FAL connection to use for the model.
✓
fal
Input Parameters
model
string
✓
-
The FAL model to run (format: 'owner/model_name'). Example: 'fal-ai/fast-sdxl'
input_params
object
✓
-
The input parameters for the model. These vary depending on the model you're using. Check the model's documentation for details.
image_input
string
-
-
Optional image input for models that require an image. This will be added to the input parameters with the key 'image'.
use_streaming
boolean
-
false
Whether to use streaming for models that support it. This allows receiving partial results as they become available.
Output Parameters
result
any
The output from the FAL model. This can be text, URLs to generated images, or other data depending on the model.
How It Works
This node sends a request to FAL.ai's API to run a specified machine learning model with your input parameters. FAL.ai executes the model on their optimized infrastructure and returns the results. For models that support streaming, you can enable streaming to receive partial results as they become available, making the interaction more interactive. The output is returned to the next node in your workflow.
Usage Examples
Example 1: Image Generation
Input:
model: "fal-ai/fast-sdxl"
input_params: {
"prompt": "A beautiful sunset over mountains",
"negative_prompt": "blurry",
"num_inference_steps": 20,
"guidance_scale": 7.5
}
use_streaming: falseOutput:
result: {
"images": [
{
"url": "https://fal.media/files/output_123.jpg"
}
]
}Example 2: Image Processing with Streaming
Input:
model: "fal-ai/image-to-text"
image_input: "https://example.com/photo.jpg"
input_params: {
"max_tokens": 100
}
use_streaming: trueOutput:
result: "A woman standing on a beach with clear blue water in the background, wearing a red sundress..."Example 3: Video Generation
Input:
model: "fal-ai/stable-video"
input_params: {
"prompt": "A robot walking through a futuristic city",
"duration": 4,
"fps": 24
}Output:
result: {
"video": {
"url": "https://fal.media/files/video_456.mp4"
}
}Common Use Cases
Image Generation: Generate images using fast and efficient models like SDXL
Image Processing: Upscale, enhance, or transform existing images
Video Generation: Create videos from text prompts or images
Text Extraction: Extract text from images using OCR models
Image Analysis: Analyze images and generate descriptions or metadata
Real-time Processing: Use streaming for interactive, low-latency AI processing
Content Creation: Generate marketing materials, thumbnails, and visual content
Error Handling
Invalid Model
Model identifier doesn't exist or is malformed
Verify model name on FAL.ai's model repository
Missing Input Parameters
Required parameters for the model are not provided
Check the model's documentation for required inputs
Invalid Image URL
Image URL is not publicly accessible
Ensure URLs are publicly accessible and use http:// or https://
Streaming Not Supported
Model doesn't support streaming but streaming is enabled
Disable streaming or use a model that supports it
Timeout
Model execution takes longer than expected
Check FAL.ai status page or try again later
Rate Limit
Too many concurrent requests to FAL.ai
Implement request queuing or contact FAL.ai support
Notes
Model Format: Use the owner/model_name format to reference models. You can browse available models on FAL.ai's model repository. Most models start with the owner prefix, typically 'fal-ai/'.
Input Parameters: The
input_paramsobject structure depends on the specific model. Refer to the model's documentation on FAL to understand what parameters it accepts and their expected formats.Image URLs: URLs provided in
image_inputor withininput_paramsshould be publicly accessible. The model needs to download them.Streaming Support: Some FAL models support streaming, which returns partial results as they become available. Enable
use_streamingto use this feature if supported by the model.Output Format: Model outputs vary by model type. Image models return URLs, video models return video files, and text models return text. Check the specific model's documentation for output format details.
Performance: FAL models are optimized for performance. Some models run very quickly, while others may take longer depending on complexity and load.
Cost: FAL.ai charges per model execution. Check their pricing page to understand costs for different models.
Last updated
Was this helpful?