---
description: A multimodal video generation model supporting text-to-video, first and last frame image-to-video, and reference-to-video generation with 768P and 2K output.
title: MiniMax H3
image: https://developers.cloudflare.com/og-docs.png
---

[Skip to content](#main-content)

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

![MiniMax logo](https://developers.cloudflare.com/_astro/minimax.B0Y99aoe.svg)

# MiniMax H3

Text-to-Video • MiniMax

Copy as Markdown| [View as Markdown](https://developers.cloudflare.com/ai/models/minimax/h3/index.md)| [Agent setup](https://developers.cloudflare.com/agent-setup/)

`minimax/h3`

- Third-party

A multimodal video generation model supporting text-to-video, first and last frame image-to-video, and reference-to-video generation with 768P and 2K output.

| Model Info | |
| --- | --- |
| Terms and License | [link ↗](https://platform.minimax.io/docs/guides/terms-of-service.md) |
| More information | [link ↗](https://platform.minimax.io/docs/guides/video-generation.md) |
| Pricing | <ul><li>Default (per second)$0.08</li><li>@768p (per second)$0.08</li><li>@2k (per second)$0.13</li></ul> |

## Usage

```ts
const response = await env.AI.run(
  'minimax/h3',
  {
    content: [
      {
        type: 'text',
        text: 'A cinematic space-opera teaser: a fleet jumps into hyperspace above a purple nebula while a lone captain watches from a glass observation deck.',
      },
    ],
    duration: 5,
    ratio: '16:9',
    resolution: '2K',
  },
)
console.log(response)
```

```bash
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "minimax/h3",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "A cinematic space-opera teaser: a fleet jumps into hyperspace above a purple nebula while a lone captain watches from a glass observation deck."
      }
    ],
    "duration": 5,
    "ratio": "16:9",
    "resolution": "2K"
  }
}'
```

```json
{
  "task": {
    "id": "441812275253329",
    "model": "MiniMax-H3",
    "status": "succeeded",
    "created_at": 1789417263,
    "updated_at": 1789417606,
    "content": {
      "url": "https://examples.aig.cloudflare.com/minimax/h3/text-to-video-2k.mp4"
    },
    "resolution": "2K",
    "duration": 5,
    "usage": {
      "total_seconds": 5,
      "input_seconds": 0,
      "output_seconds": 5,
      "input_image_count": 0,
      "total_tokens": 260390,
      "prompt_tokens": 0,
      "completion_tokens": 260390
    },
    "ratio": "16:9",
    "task_type": "generation"
  }
}
```

## Examples

<details>

<summary>**First Frame Image to Video** — Animate a supplied image as the first frame.</summary>



```ts
const response = await env.AI.run(
  'minimax/h3',
  {
    content: [
      {
        type: 'text',
        text: 'Slowly push in while the leaves move gently in the breeze and warm sunlight flickers through the branches.',
      },
      {
        type: 'image_url',
        image_url: {
          url: 'https://filecdn.minimax.chat/public/85c96368-6ead-4eae-af9c-116be878eac3.png',
        },
        role: 'first_frame',
      },
    ],
    duration: 5,
    resolution: '768P',
    ratio: 'adaptive',
  },
)
console.log(response)
```

```bash
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "minimax/h3",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "Slowly push in while the leaves move gently in the breeze and warm sunlight flickers through the branches."
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://filecdn.minimax.chat/public/85c96368-6ead-4eae-af9c-116be878eac3.png"
        },
        "role": "first_frame"
      }
    ],
    "duration": 5,
    "resolution": "768P",
    "ratio": "adaptive"
  }
}'
```

```json
{
  "task": {
    "id": "441814879252673",
    "model": "MiniMax-H3",
    "status": "succeeded",
    "created_at": 1789417772,
    "updated_at": 1789417915,
    "content": {
      "url": "https://examples.aig.cloudflare.com/minimax/h3/first-frame-image-to-video.mp4"
    },
    "resolution": "768P",
    "duration": 5,
    "usage": {
      "total_seconds": 5,
      "input_seconds": 0,
      "output_seconds": 5,
      "input_image_count": 1,
      "total_tokens": 175765,
      "prompt_tokens": 13020,
      "completion_tokens": 162745
    },
    "ratio": "adaptive",
    "task_type": "generation"
  }
}
```

</details>

<details>

<summary>**Last Frame Image to Video** — Generate a transition that ends on a supplied image.</summary>



```ts
const response = await env.AI.run(
  'minimax/h3',
  {
    content: [
      {
        type: 'text',
        text: 'A paper airplane flies through a city at sunset and gently lands on the desk shown in the final frame.',
      },
      {
        type: 'image_url',
        image_url: {
          url: 'https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg',
        },
        role: 'last_frame',
      },
    ],
    duration: 6,
    resolution: '768P',
    ratio: 'adaptive',
  },
)
console.log(response)
```

```bash
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "minimax/h3",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "A paper airplane flies through a city at sunset and gently lands on the desk shown in the final frame."
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg"
        },
        "role": "last_frame"
      }
    ],
    "duration": 6,
    "resolution": "768P",
    "ratio": "adaptive"
  }
}'
```

```json
{
  "task": {
    "id": "441808217669932",
    "model": "MiniMax-H3",
    "status": "succeeded",
    "created_at": 1789416497,
    "updated_at": 1789416694,
    "content": {
      "url": "https://examples.aig.cloudflare.com/minimax/h3/last-frame-image-to-video.mp4"
    },
    "resolution": "768P",
    "duration": 6,
    "usage": {
      "total_seconds": 6,
      "input_seconds": 0,
      "output_seconds": 6,
      "input_image_count": 1,
      "total_tokens": 208314,
      "prompt_tokens": 13020,
      "completion_tokens": 195294
    },
    "ratio": "adaptive",
    "task_type": "generation"
  }
}
```

</details>

<details>

<summary>**First and Last Frame** — Create a controlled transition between supplied first and last frames.</summary>



```ts
const response = await env.AI.run(
  'minimax/h3',
  {
    content: [
      {
        type: 'text',
        text: 'Show the character growing from childhood into adulthood through a continuous, emotional camera move.',
      },
      {
        type: 'image_url',
        image_url: {
          url: 'https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg',
        },
        role: 'first_frame',
      },
      {
        type: 'image_url',
        image_url: {
          url: 'https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg',
        },
        role: 'last_frame',
      },
    ],
    duration: 5,
    resolution: '2K',
    ratio: 'adaptive',
  },
)
console.log(response)
```

```bash
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "minimax/h3",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "Show the character growing from childhood into adulthood through a continuous, emotional camera move."
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg"
        },
        "role": "first_frame"
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg"
        },
        "role": "last_frame"
      }
    ],
    "duration": 5,
    "resolution": "2K",
    "ratio": "adaptive"
  }
}'
```

```json
{
  "task": {
    "id": "441811301478471",
    "model": "MiniMax-H3",
    "status": "succeeded",
    "created_at": 1789416926,
    "updated_at": 1789417242,
    "content": {
      "url": "https://examples.aig.cloudflare.com/minimax/h3/first-and-last-frame.mp4"
    },
    "resolution": "2K",
    "duration": 5,
    "usage": {
      "total_seconds": 5,
      "input_seconds": 0,
      "output_seconds": 5,
      "input_image_count": 2,
      "total_tokens": 286430,
      "prompt_tokens": 26040,
      "completion_tokens": 260390
    },
    "ratio": "adaptive",
    "task_type": "generation"
  }
}
```

</details>

<details>

<summary>**Multiple Reference Images** — Use multiple reference images to preserve character appearance and style.</summary>



```ts
const response = await env.AI.run(
  'minimax/h3',
  {
    content: [
      {
        type: 'text',
        text: "The character walks through a rainy city street, preserving the character's appearance from the first reference and the visual style from the second.",
      },
      {
        type: 'image_url',
        image_url: {
          url: 'https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/9d5c7a33fa6e_01_%E5%9B%BE1_MHGgbVga3o_gpt4o-image-1780651118146.png',
        },
        role: 'reference_image',
      },
      {
        type: 'image_url',
        image_url: {
          url: 'https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/7af326902315_00_%E5%9B%BE2_YqtKbY1jpo_u4391985813_Young_male_wearing_cream_hoodie_and_dark_brown_sh_45d56ed0-d626-4c37-9a5b-77f51f374982_1.png',
        },
        role: 'reference_image',
      },
    ],
    duration: 5,
    resolution: '2K',
    ratio: '16:9',
  },
)
console.log(response)
```

```bash
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "minimax/h3",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "The character walks through a rainy city street, preserving the character'\''s appearance from the first reference and the visual style from the second."
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/9d5c7a33fa6e_01_%E5%9B%BE1_MHGgbVga3o_gpt4o-image-1780651118146.png"
        },
        "role": "reference_image"
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/7af326902315_00_%E5%9B%BE2_YqtKbY1jpo_u4391985813_Young_male_wearing_cream_hoodie_and_dark_brown_sh_45d56ed0-d626-4c37-9a5b-77f51f374982_1.png"
        },
        "role": "reference_image"
      }
    ],
    "duration": 5,
    "resolution": "2K",
    "ratio": "16:9"
  }
}'
```

```json
{
  "task": {
    "id": "441814469210409",
    "model": "MiniMax-H3",
    "status": "succeeded",
    "created_at": 1789417917,
    "updated_at": 1789418171,
    "content": {
      "url": "https://examples.aig.cloudflare.com/minimax/h3/multiple-reference-images.mp4"
    },
    "resolution": "2K",
    "duration": 5,
    "usage": {
      "total_seconds": 5,
      "input_seconds": 0,
      "output_seconds": 5,
      "input_image_count": 2,
      "total_tokens": 286430,
      "prompt_tokens": 26040,
      "completion_tokens": 260390
    },
    "ratio": "16:9",
    "task_type": "generation"
  }
}
```

</details>

## Parameters

▶content\[]

`array`requiredminItems: 1

resolution

`string`requiredenum: 768P, 2K

duration

`integer`requiredminimum: 4maximum: 15

ratio

`string`enum: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16

callback\_url

`string`format: uri

▶task{}

`object`

## API Schemas (Raw)

Input [Open](https://developers.cloudflare.com/ai/models/minimax/h3/schema-input.json) [Download](https://developers.cloudflare.com/ai/models/minimax/h3/schema-input.json)

Output [Open](https://developers.cloudflare.com/ai/models/minimax/h3/schema-output.json) [Download](https://developers.cloudflare.com/ai/models/minimax/h3/schema-output.json)

Was this helpful?

YesNo

## On this page

[![](https://developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ai/models/minimax/h3/#page","headline":"MiniMax H3","description":"A multimodal video generation model supporting text-to-video, first and last frame image-to-video, and reference-to-video generation with 768P and 2K output.","url":"https://developers.cloudflare.com/ai/models/minimax/h3/","inLanguage":"en","image":"https://developers.cloudflare.com/og-docs.png","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
