# H3 Max Turbo Extend Video

> Extend an existing video with H3 Max Turbo: add 1 to 15 seconds of prompt-guided footage, with optional audio references and output resolutions from 480p to 2K.


## Overview

- **Endpoint**: `https://fal.run/minimax/h3-max-turbo/extend-video`
- **Model ID**: `minimax/h3-max-turbo/extend-video`
- **Category**: video-to-video
- **Kind**: inference
**Description**: Extend a source video from 1.625 to 60 seconds long, up to 50 MB. Describe what happens next and add 1 to 15 seconds of new footage (5 seconds by default). Choose 480p, 768p (default), 1080p, or 2K. The aspect ratio follows the source by default. Return the full extended video or only the continuation. Optional audio references replace the source soundtrack as the audio reference: up to 3 clips, 2 to 15 seconds each and 15 seconds combined. Prompt expansion and safety checking are enabled by default.

**Tags**: extend, video, continuation



## Pricing

Billing is calculated per second of newly generated video. Your request will cost **$0.025** per second at **480p**, **$0.04** per second at **768p**, **$0.08** per second at **1080p**, and **$0.16** per second at **2K**. Billing applies to the requested continuation duration, not the original video.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`video_url`** (`string`, _required_):
  URL of the video to extend. Must be 1.625 s to 60 s long, up to 50 MB, aspect ratio between 0.4 and 2.5.
  - Examples: "https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4"

- **`prompt`** (`string`, _required_):
  What happens next. Describe the continuation, not the source.
  - Examples: "The red panda keeps walking along the log, then looks up at a bird."

- **`reference_audio_urls`** (`list<string>`, _optional_):
  Optional audio references for the continuation (2–15 seconds each, 15 seconds combined). They replace the source soundtrack as the model's audio reference.
  - Array of string

- **`enable_prompt_expansion`** (`boolean`, _optional_):
  Automatically enhance the prompt using the source video to help keep the continuation consistent. May increase processing time. Default value: `true`
  - Default: `true`

- **`duration`** (`integer`, _optional_):
  Seconds of new footage to add after the source. The actual duration may be slightly longer. Default value: `5`
  - Default: `5`
  - Range: `1` to `15`

- **`resolution`** (`ResolutionEnum`, _optional_):
  Output video resolution. Default value: `"768P"`
  - Default: `"768P"`
  - Options: `"480P"`, `"768P"`, `"1080P"`, `"2K"`

- **`aspect_ratio`** (`AspectRatioEnum`, _optional_):
  Output aspect ratio. 'auto' follows the source video. Other values crop the video to fit the selected ratio. Default value: `"auto"`
  - Default: `"auto"`
  - Options: `"auto"`, `"21:9"`, `"16:9"`, `"4:3"`, `"1:1"`, `"3:4"`, `"9:16"`

- **`seed`** (`integer`, _optional_):
  Seed for the continuation. Random when omitted.

- **`output`** (`OutputEnum`, _optional_):
  'extended' returns the whole source video followed by the new footage. 'continuation' returns only the generated continuation. Default value: `"extended"`
  - Default: `"extended"`
  - Options: `"extended"`, `"continuation"`

- **`enable_safety_checker`** (`boolean`, _optional_):
  Moderate the source video and the prompt. Default value: `true`
  - Default: `true`



**Required Parameters Example**:

```json
{
  "video_url": "https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4",
  "prompt": "The red panda keeps walking along the log, then looks up at a bird."
}
```

**Full Example**:

```json
{
  "video_url": "https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4",
  "prompt": "The red panda keeps walking along the log, then looks up at a bird.",
  "enable_prompt_expansion": true,
  "duration": 5,
  "resolution": "768P",
  "aspect_ratio": "auto",
  "output": "extended",
  "enable_safety_checker": true
}
```


### Output Schema

The API returns the following output format:

- **`video`** (`File`, _required_):
  The extended video, or only the continuation per 'output'.

- **`seed`** (`integer`, _required_):
  Seed used for the continuation.

- **`duration`** (`float`, _required_):
  Seconds of returned video.

- **`source`** (`Source`, _required_):
  Source video information: width, height, frame rate, duration, and audio.

- **`expanded_prompt`** (`string`, _optional_):
  The prompt used after expansion, or null when unchanged.

- **`timings`** (`Timings`, _optional_)



**Example Response**:

```json
{
  "video": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/minimax/h3-max-turbo/extend-video \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "video_url": "https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4",
     "prompt": "The red panda keeps walking along the log, then looks up at a bird."
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "minimax/h3-max-turbo/extend-video",
    arguments={
        "video_url": "https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4",
        "prompt": "The red panda keeps walking along the log, then looks up at a bird."
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("minimax/h3-max-turbo/extend-video", {
  input: {
    video_url: "https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4",
    prompt: "The red panda keeps walking along the log, then looks up at a bird."
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/minimax/h3-max-turbo/extend-video)
- [API Documentation](https://fal.ai/models/minimax/h3-max-turbo/extend-video/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=minimax/h3-max-turbo/extend-video)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
