Skip to content
MiniMax logo

MiniMax H3

Text-to-Video • MiniMax

View as MarkdownAgent setup
  • 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 Licenselink ↗
More informationlink ↗
Pricing
  • Default (per second)$0.08
  • @768p (per second)$0.08
  • @2k (per second)$0.13

Usage

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)
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"
  }
}'
{
  "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

First Frame Image to Video — Animate a supplied image as the first frame.
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)
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"
  }
}'
{
  "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"
  }
}
Last Frame Image to Video — Generate a transition that ends on a supplied image.
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)
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"
  }
}'
{
  "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"
  }
}
First and Last Frame — Create a controlled transition between supplied first and last frames.
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)
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"
  }
}'
{
  "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"
  }
}
Multiple Reference Images — Use multiple reference images to preserve character appearance and style.
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)
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"
  }
}'
{
  "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"
  }
}

Parameters

resolution
stringrequiredenum: 768P, 2K
duration
integerrequiredminimum: 4maximum: 15
ratio
stringenum: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16
callback_url
stringformat: uri

API Schemas (Raw)

Input
Output

Was this helpful?