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

# Scripted clip workflow

> Python CLI that creates a clip, generates audio, then renders talking-avatar video.

A small Python CLI for the [clip API](/guides/clips/overview): list clips, create a clip, generate audio, print phonemes and per-chunk video instructions, then render video.

## Prerequisites

* **Python 3.10+**
* An **Akapulu API key** — [akapulu.com/api-keys](https://akapulu.com/api-keys)

The script uses **Clara** (`1f777f64-3758-4a7d-9cbc-c64ae654f7d1`) unless you set another catalog id. Browse avatars at [akapulu.com/catalog](https://akapulu.com/catalog).

Video takes several minutes and uses more credits than audio. Approximate costs are in the [clips overview](/guides/clips/overview).

## Setup

```bash theme={null}
git clone https://github.com/Akapulu/scripted-clip-workflow.git && cd scripted-clip-workflow
cp .env.example .env
```

Edit `.env` and set `AKAPULU_API_KEY`. Leave `AKAPULU_AVATAR_ID` as Clara, or paste another catalog UUID.

```env theme={null}
AKAPULU_API_KEY=
AKAPULU_AVATAR_ID=1f777f64-3758-4a7d-9cbc-c64ae654f7d1
```

## Run

```bash theme={null}
python3 create_clip.py
```

The script prints clip/take status every 10 seconds. After audio is ready it prints phonemes, `audio_url`, and each chunk’s face / upper-body instructions, then saves the audio under `downloads/<take_id>/`. Confirm render, wait for video, then it saves the mp4 in that same folder. `downloads/` is gitignored.

Full request-by-request flow is in [Workflow](/guides/clips/workflow).

## View on GitHub

* [scripted-clip-workflow](https://github.com/Akapulu/scripted-clip-workflow)
