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

# start • AI Agent SDK

> start: Generate video with optional wait and file output.

# start

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**VideoAgent**](../classes/VideoAgent) class in the [**video\_agent**](../modules/video_agent) module.

Generate video with optional wait and file output.

Beginner-friendly method that handles the full workflow:

1. Generate video
2. Wait for completion (if wait=True)
3. Download and save to file (if output is specified)

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def start(prompt: str, wait: bool, output: Optional[str]) -> Union[Any, bytes]
```

## Parameters

<ParamField query="prompt" type="str" required={true}>
  Text description of the desired video
</ParamField>

<ParamField query="wait" type="bool" required={false} default="True">
  If True, wait for completion before returning
</ParamField>

<ParamField query="output" type="Optional" required={false}>
  Path to save the video file (e.g., "video.mp4") \*\*kwargs: Additional parameters for generate()
</ParamField>

### Returns

<ResponseField name="Returns" type="Union[Any, bytes]">
  VideoObject with initial status

  * If wait=True and output: bytes (video content)
  * If wait=True and no output: VideoObject with completed status
</ResponseField>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Full workflow with file output
    video = agent.start(
        prompt="A serene lake at sunset",
        wait=True,
        output="sunset.mp4"
    )

    # Just generate (don't wait)
    video = agent.start(
        prompt="A cat playing",
        wait=False
    )
    print(f"Video ID: {video.id}")  # Poll later with status()
```

## Uses

* `generate`
* `wait_for_completion`
* `content`
* `f.write`

## Used By

* [`Agent.start`](../functions/Agent-start)
* [`AgentTeam.run`](../functions/AgentTeam-run)
* [`AutoAgents.start`](../functions/AutoAgents-start)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/video_agent.py#L550">
  `praisonaiagents/agent/video_agent.py` at line 550
</Card>
