# H3 Max

> Insert a new scene into an existing video with H3 Max. Guide the scene with a prompt, reference images, or reference videos, then return to the original footage.


## Overview

- **Endpoint**: `https://fal.run/minimax/h3-max/insert-video`
- **Model ID**: `minimax/h3-max/insert-video`
- **Category**: video-to-video
- **Kind**: inference
**Description**: H3 Max Insert Video generates a new scene between two selected points in an existing video. Set a start time and a resume time, describe the new action or provide visual references, and receive a complete video that combines the opening footage, the generated scene, and the remaining source footage.


**Tags**: video-to-video, video-editing, scene-insertion



## Pricing

Your request will cost **$0.05 per second** of generated scene at **480p** or **$0.06 per second** at **768p**. Only the newly generated scene duration is billed, not the full output video. The first **4,096 reference tokens** are included; additional reference tokens cost **$0.02 per 1,000 tokens**, prorated.

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_)

- **`prompt`** (`string`, _optional_)

- **`reference_image_urls`** (`list<string>`, _optional_)
  - Array of string

- **`reference_video_urls`** (`list<string>`, _optional_)
  - Array of string

- **`start_time`** (`float`, _required_)
  - Range: `1.625` to `60`

- **`resume_time`** (`float`, _required_)
  - Range: `2.625` to `60`

- **`duration`** (`float`, _optional_):
   Default value: `5`
  - Default: `5`
  - Range: `5` to `13`

- **`resolution`** (`ResolutionEnum`, _optional_):
   Default value: `"768p"`
  - Default: `"768p"`
  - Options: `"480p"`, `"768p"`

- **`seed`** (`integer`, _optional_)
  - Range: `0` to `2147483647`

- **`enable_prompt_expansion`** (`boolean`, _optional_):
   Default value: `true`
  - Default: `true`

- **`color_match`** (`boolean`, _optional_):
   Default value: `true`
  - Default: `true`



**Required Parameters Example**:

```json
{
  "video_url": ""
}
```

**Full Example**:

```json
{
  "video_url": "",
  "duration": 5,
  "resolution": "768p",
  "enable_prompt_expansion": true,
  "color_match": true
}
```


### Output Schema

The API returns the following output format:

- **`video`** (`VideoFile`, _required_)

- **`seed`** (`integer`, _required_)

- **`width`** (`integer`, _required_)

- **`height`** (`integer`, _required_)

- **`frame_count`** (`integer`, _required_)

- **`duration`** (`float`, _required_)

- **`start_time`** (`float`, _required_)

- **`resume_time`** (`float`, _required_)

- **`injected_duration`** (`float`, _required_)

- **`expanded_prompt`** (`string`, _optional_)

- **`source`** (`Source`, _required_)

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



**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/insert-video \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "video_url": ""
   }'
```

### 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/insert-video",
    arguments={
        "video_url": ""
    },
    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/insert-video", {
  input: {
    video_url: ""
  },
  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/insert-video)
- [API Documentation](https://fal.ai/models/minimax/h3-max/insert-video/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=minimax/h3-max/insert-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`
