Skip to main content
This example demonstrates how to generate a video using FAL in an Agno agent.

Prerequisites

You’ll need to have the following:
  • fal_client library installed
  • An API key from Fal

Setup

uv pip install -U fal_client
export FAL_KEY=***

Code

video_agent.py
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",
            enable_generate_media=True,
        )
    ],
    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,
)

fal_agent.print_response("Generate video of balloon in the ocean")