> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phidata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ModelsLabs Agent

ModelsLabs is a video generation tool that allows you to generate videos based on a text prompt.

Create a file `models_labs_agent.py` with the following code:

```python models_labs_agent.py theme={null}
from phi.agent import Agent
from phi.tools.models_labs import ModelsLabs

# Create an Agent with the ModelsLabs tool
agent = Agent(tools=[ModelsLabs()], name="ModelsLabs Agent")

agent.print_response("Generate a video of a beautiful sunset over the ocean", markdown=True)
```

## Usage

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

  <Step title="Install libraries">
    ```bash theme={null}
    pip install requests
    ```
  </Step>

  <Step title="Set environment variables">
    ```bash theme={null}
    export MODELS_LAB_API_KEY=****
    ```
  </Step>

  <Step title="Run the agent">
    ```bash theme={null}
    python models_labs_agent.py
    ```
  </Step>
</Steps>
