> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fal Tools

> Generate a video from a text prompt with FalTools and the fal-ai/hunyuan-video model.

```python fal_tools.py theme={null}
"""
Fal Tools
=============================

Demonstrates fal tools.
"""

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.fal import FalTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------


fal_agent = Agent(
    name="Fal Video Generator Agent",
    model=OpenAIChat(id="gpt-5.6-luna"),
    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,
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    fal_agent.print_response("Generate video of balloon in the ocean")
```

## Run the Example

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U agno fal-client openai
```

**2. Export environment variables**

```bash Mac/Linux theme={null}
export FAL_API_KEY="your_fal_key_here"
export FAL_KEY="your_fal_key_here"
export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
$Env:FAL_API_KEY="your_fal_key_here"
$Env:FAL_KEY="your_fal_key_here"
$Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**3. Run the example**

Save the code above as `fal_tools.py`, then run:

```bash theme={null}
python fal_tools.py
```

Full source: [cookbook/91\_tools/fal\_tools.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/91_tools/fal_tools.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.