Fal Integration
Generate high-quality images from text prompts using Fal.ai's advanced AI image generation models.
Timbal integrates with Fal.ai to enable AI-powered image generation. This integration allows you to generate high-quality images from text prompts using various models.
Prerequisites
Before using the Fal integration, you'll need:
- A Fal.ai account
- An API key from your Fal.ai dashboard
- Set the
FAL_KEY
environment variable with your API key
Authentication Setup
Set your Fal.ai API key as an environment variable: FAL_KEY="your-api-key-here"
Installation
Install the requirements by doing:
Generate Images
Description
The gen_images step allows you to generate images from text prompts using Fal.ai's models.
Example
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
prompt | str | The text prompt to generate an image from | Yes |
model | str | The model to use for image generation. Default: "fal-ai/flux-pro/v1.1-ultra" | No |
Agent Integration Example
Notes
- Make sure your Fal.ai API key is properly set in the environment variables
- The default model (fal-ai/flux-pro/v1.1-ultra) costs approximately $0.06 per image
- The function returns a list of File objects containing the generated image URLs
- Images are generated asynchronously and the function will wait for completion
- For more advanced usage and available models, see the Fal.ai documentation