# H3 Max Reframe

> Expands existing videos to a selected aspect ratio with generative outpainting, preserving source audio and timing. Supports optional text guidance and 480p or 768p output.


## Overview

- **Endpoint**: `https://fal.run/minimax/h3-max/reframe-video`
- **Model ID**: `minimax/h3-max/reframe-video`
- **Category**: video-to-video
- **Kind**: inference
**Description**: H3 Max Reframe adapts an existing video to a new aspect ratio by fitting the source onto a target canvas and generating the surrounding areas. It supports source videos from 0.25 to 300 seconds, seven aspect ratios, and 480p or 768p output profiles, with optional text guidance and seed control. The endpoint retains the source timeline and audio, while the generated image is not guaranteed to preserve source pixels exactly.

**Tags**: video, outpainting, reframing



## Pricing

Billing is calculated per second of video generated at **$0.05** for **480p** or **$0.08** for **768p**. For short videos, billing follows the output duration; a **5-second** video at **768p** costs **$0.40**. Longer source videos are processed in overlapping windows, and generated overlap seconds are also billable, so billed duration can exceed the final video duration.

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:


- **`prompt`** (`string`, _optional_):
  Optional guidance for the new surroundings. Expansion captions the source automatically. Default value: `""`
  - Default: `""`

- **`video_url`** (`string`, _required_):
  Source video, 0.25 to 300 seconds; fitted onto the target canvas with its timeline and audio preserved.

- **`aspect_ratio`** (`AspectRatioEnum`, _optional_):
  Target canvas aspect ratio; the source is contain-fitted and the rest is outpainted. Default value: `"16:9"`
  - Default: `"16:9"`
  - Options: `"16:9"`, `"9:16"`, `"1:1"`, `"4:3"`, `"3:4"`, `"21:9"`, `"9:21"`

- **`resolution`** (`ResolutionEnum`, _optional_):
  Target canvas resolution profile. 1080p uses learned latent upscaling from a native 768p reframe. Default value: `"768p"`
  - Default: `"768p"`
  - Options: `"480p"`, `"768p"`, `"1080p"`

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

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



**Required Parameters Example**:

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

**Full Example**:

```json
{
  "video_url": "",
  "aspect_ratio": "16:9",
  "resolution": "768p",
  "enable_safety_checker": true
}
```


### Output Schema

The API returns the following output format:

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

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

- **`placement`** (`Placement`, _required_)

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

- **`frames_per_second`** (`integer`, _optional_):
   Default value: `24`
  - Default: `24`

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



**Example Response**:

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


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/minimax/h3-max/reframe-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/reframe-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/reframe-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/reframe-video)
- [API Documentation](https://fal.ai/models/minimax/h3-max/reframe-video/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=minimax/h3-max/reframe-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`
