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

# Cast

> Make presenter videos from a saved avatar and a script with mel cast.

`mel cast` makes a video of a saved avatar speaking your script. It runs the same Cast as Melius, charges your team's credits, and puts finished videos in Cast's **History**. The [command reference](https://docs.melius.com/cli/commands.md#cast) lists every command.

**Prepare** checks the request and estimates credits without generating, **run** starts the paid video, and **wait** blocks until it's done.

## 1. Find an avatar

```bash theme={null}
mel cast library --kind avatar --roster custom
```

Each result has an `avatar` selector (`{ "kind", "id" }`) and a `name`. Use `--roster melius` for Melius avatars, and `--kind background` for saved backgrounds.

## 2. Write the request

Save the request as JSON. `sections` is the script: 1–30 sections, each with spoken `text` and an optional silent `action`.

```json request.json theme={null}
{
    "avatar": { "name": "Loopy" },
    "sections": [
        { "text": "Mornings used to be chaos. Then I found this serum." },
        {
            "text": "Two drops, and I am out the door.",
            "action": "Holds up the bottle to the camera"
        }
    ],
    "props": [{ "assetId": "<productImageId>", "name": "serum" }],
    "aspectRatio": "9:16"
}
```

* `avatar` takes a name or the exact `{ "kind", "id" }` selector. A name that matches several avatars needs the selector.
* Leave out `voice` to use the avatar's saved voice. `mel audio voice list` lists other voices.
* `props` takes up to six images. Get asset IDs from `mel upload` or `mel asset search`.
* `mel cast options` lists models, resolutions, aspect ratios and subtitle presets.
* `mel cast templates` lists script templates to start from.

## 3. Prepare, run and wait

```bash theme={null}
mel cast prepare --input-file request.json > prepared.json
mel cast run --input-file prepared.json --fields generationId,status
mel cast wait --id <generationId>
mel cast download --id <generationId> --output video.mp4
```

`prepare` returns `status: "ready"` with `estimatedCredits`, or `invalid` with a `validationError`. Only a ready preparation can run. Keep `prepared.json`: if you lose the response from `mel cast run`, run the same file again to get the same video back instead of starting another.

`mel cast wait` stops waiting after 60 seconds at most (`--timeout`) with exit code `4`, and the video keeps rendering. Run `wait` again with the same ID to keep waiting.


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