# 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). The full extended video retains its original source soundtrack, and its ending still conditions the transition. These clips guide the newly generated audio instead of using that soundtrack as an audio reference. Assign each clip a role in the prompt, such as 'Audio 1 for the voice' and 'Audio 2 for background music'.
  - 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`** (`float`, _optional_):
  Seconds of new footage to add. The continuation clip also includes 1.625 seconds from the source's ending and may be longer because of frame rounding. Default value: `5`
  - Default: `5`
  - Range: `0.71` 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 source and new footage as one video. 'continuation' returns a clip that starts with a 1.625-second repeat of the source's ending, then shows the new footage. 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 returned video. In 'continuation' mode, it includes the 1.625-second repeat at the start.

- **`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);
```


## Deploy your own model

To run your own weights, a fine-tune or a custom pipeline on the GPUs that serve this API, deploy it on fal Serverless. GPUs from H100 (80GB) to B300 (288GB), billed per second; an H100 is $4.50/h list, as low as $2.49/h. Prices, GPU specs and deploy steps: [fal Serverless](https://fal.ai/serverless.md).

## 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
- [Pricing](https://fal.ai/pricing.md): Model API and Serverless GPU prices
- [fal Serverless](https://fal.ai/serverless.md): Deploy your own models: GPU prices, specs and steps
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
