Fal
FalTools enable an Agent to generate and transform images and videos using the Fal AI platform.
FalTools enable an Agent to perform media generation tasks.
Prerequisites
The following example requires the fal_client library and an API key which can be obtained from Fal.
uv pip install -U agno fal_client openaiexport FAL_KEY=***FalTools checks the FAL_API_KEY environment variable and logs an error
when it is missing. Authentication still works with FAL_KEY alone because
fal_client reads it directly. Set both variables to avoid the log message.
Example
The following agent will use FAL to generate any video requested by the user.
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.tools.fal import FalTools
fal_agent = Agent(
name="Fal Video Generator Agent",
model=OpenAIResponses(id="gpt-5.2"),
tools=[FalTools(model="fal-ai/hunyuan-video")],
description="You are an AI agent that can generate videos using the Fal API.",
instructions=[
"When the user asks you to create a video, use the `generate_media` tool to create the video.",
"Return the URL as raw to the user.",
"Don't convert video URL to markdown or anything else.",
],
markdown=True,
debug_mode=True,
)
fal_agent.print_response("Generate video of balloon in the ocean")Toolkit Params
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | str | None | Stored by Agno; not forwarded to the module-level Fal client. Set FAL_KEY for SDK authentication. |
model | str | fal-ai/hunyuan-video | The model to use for the media generation. |
enable_generate_media | bool | True | Enable the generate_media functionality. |
enable_image_to_image | bool | False | Enable the image_to_image functionality. |
all | bool | False | Enable all functionality. |
Toolkit Functions
| Function | Description |
|---|---|
generate_media | Generate media using the configured model; the model determines the output type. |
image_to_image | Transform an input image using the fixed Flux image-to-image endpoint, independently of the constructor model. |