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

# Video Editing Agent (VEA)

> An automated pipeline for converting long-form videos into short-form edits.

VEA (Video Editing Agent) is an AI editing system for long-form media.
It automates the path from understanding source footage to exporting short-form video and editing artifacts.

<CardGroup cols={2}>
  <Card title="Long-Form Understanding" icon="brain-circuit">
    Uses Memories.ai-powered indexing and comprehension to reason over long videos.
  </Card>

  <Card title="Narrative Generation" icon="file-lines">
    Generates recap/highlight scripts from your prompt and project context.
  </Card>

  <Card title="Clip Planning + Rendering" icon="layer-group">
    Selects relevant clips, composes timeline, and renders final output.
  </Card>

  <Card title="Production Outputs" icon="download">
    Exports both `.mp4` deliverables and Final Cut Pro XML for downstream editing.
  </Card>
</CardGroup>

## Pipeline

1. **Index source media** to build searchable understanding artifacts.
2. **Generate structured response plan** (recap, highlights, or custom narrative).
3. **Select and assemble clips** based on semantic relevance.
4. **Apply narration/music/cropping/subtitles** according to options.
5. **Export outputs** for distribution and editor handoff.

## API Workflow

Index first:

```bash theme={null}
curl -X POST http://localhost:8000/video-edit/v1/index \
  -H "Content-Type: application/json" \
  -d '{
    "blob_path": "data/videos/MyProject/",
    "start_fresh": true
  }'
```

Then generate:

```bash theme={null}
curl -X POST http://localhost:8000/video-edit/v1/flexible_respond \
  -H "Content-Type: application/json" \
  -d '{
    "blob_path": "data/videos/MyProject/",
    "prompt": "Create a 2-minute recap of this movie",
    "video_response": true,
    "music": true,
    "narration": true,
    "subtitles": true
  }'
```

## Setup Essentials

```bash theme={null}
git clone https://github.com/Memories-ai-labs/vea-open-source.git
cd vea-open-source
uv sync
cp config.example.json config.json
```

Required configuration values:

* `MEMORIES_API_KEY`
* `GOOGLE_CLOUD_PROJECT`
* `ELEVENLABS_API_KEY`

Also required:

* Python 3.11+
* FFmpeg installed
* `gcloud auth application-default login` before runtime

## Output Structure

Generated artifacts are typically saved under `data/outputs/{ProjectName}/`:

* Final rendered video (`.mp4`)
* Final Cut Pro XML (`.fcpxml`)
* Intermediate assets such as clip plan, narration files, and music assets

## Best Fit

* Movie/documentary recap generation
* Highlight reel automation for media teams
* Long-to-short content repurposing pipelines
* Editor-assist workflows that still need timeline-level control

<Note>
  Repository: [Memories-ai-labs/vea-open-source](https://github.com/Memories-ai-labs/vea-open-source)
</Note>
