typetext
{
"duration": 5,
"first_frame_image": "https://replicate.delivery/xezq/2r7wZ9Pj2yYDGJKsZo8jBCT0fIGIZo0ixo1FIVHeRDZrC8dXA/tmphk1i9ddj.png",
"prompt": "Rain streams down the diner window, droplets running and merging. Blurry headlights pass outside. The neon sign flickers once. The woman slowly lifts her coffee mug, takes a sip, and sets it down, gazing out at the rain. Steam curls from the mug. Very slow push-in. Moody teal and red film look.",
"resolution": "2K"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_cZi**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run minimax/h3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
duration: 5,
first_frame_image: "https://replicate.delivery/xezq/2r7wZ9Pj2yYDGJKsZo8jBCT0fIGIZo0ixo1FIVHeRDZrC8dXA/tmphk1i9ddj.png",
prompt: "Rain streams down the diner window, droplets running and merging. Blurry headlights pass outside. The neon sign flickers once. The woman slowly lifts her coffee mug, takes a sip, and sets it down, gazing out at the rain. Steam curls from the mug. Very slow push-in. Moody teal and red film look.",
resolution: "2K"
};
const output = await replicate.run("minimax/h3", { input });
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_cZi**********************************
This is your API token. Keep it to yourself.
import replicate
Run minimax/h3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"minimax/h3",
input={
"duration": 5,
"first_frame_image": "https://replicate.delivery/xezq/2r7wZ9Pj2yYDGJKsZo8jBCT0fIGIZo0ixo1FIVHeRDZrC8dXA/tmphk1i9ddj.png",
"prompt": "Rain streams down the diner window, droplets running and merging. Blurry headlights pass outside. The neon sign flickers once. The woman slowly lifts her coffee mug, takes a sip, and sets it down, gazing out at the rain. Steam curls from the mug. Very slow push-in. Moody teal and red film look.",
"resolution": "2K"
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_cZi**********************************
This is your API token. Keep it to yourself.
Run minimax/h3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"input": {
"duration": 5,
"first_frame_image": "https://replicate.delivery/xezq/2r7wZ9Pj2yYDGJKsZo8jBCT0fIGIZo0ixo1FIVHeRDZrC8dXA/tmphk1i9ddj.png",
"prompt": "Rain streams down the diner window, droplets running and merging. Blurry headlights pass outside. The neon sign flickers once. The woman slowly lifts her coffee mug, takes a sip, and sets it down, gazing out at the rain. Steam curls from the mug. Very slow push-in. Moody teal and red film look.",
"resolution": "2K"
}
}' \
https://api.replicate.com/v1/models/minimax/h3/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "zx94c9e1rnrmt0d1m94rrrvsrw",
"model": "minimax/h3",
"version": "hidden",
"input": {
"duration": 5,
"first_frame_image": "https://replicate.delivery/xezq/2r7wZ9Pj2yYDGJKsZo8jBCT0fIGIZo0ixo1FIVHeRDZrC8dXA/tmphk1i9ddj.png",
"prompt": "Rain streams down the diner window, droplets running and merging. Blurry headlights pass outside. The neon sign flickers once. The woman slowly lifts her coffee mug, takes a sip, and sets it down, gazing out at the rain. Steam curls from the mug. Very slow push-in. Moody teal and red film look.",
"resolution": "2K"
},
"logs": "Generating video with MiniMax H3...\nDownloading 1388536 bytes\nDownloaded 1.32MB in 0.48sec",
"output": "https://replicate.delivery/xezq/Mx5AOKV0uz5JPZx4TfNEffkiDaPuydRWQ3XbfY0IfG3fgBfuLA/tmp6soiyvtv.mp4",
"data_removed": false,
"error": null,
"source": "api",
"status": "succeeded",
"created_at": "2026-11-03T16:41:45.157Z",
"started_at": "2026-11-03T16:41:45.172542Z",
"completed_at": "2026-11-03T16:44:51.916916Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/zx94c9e1rnrmt0d1m94rrrvsrw/cancel",
"get": "https://api.replicate.com/v1/predictions/zx94c9e1rnrmt0d1m94rrrvsrw",
"stream": "https://stream.replicate.com/v1/files/jbxs-nxyzyeazzj4rpf2dz43wt2ivmvuqto5kfum52y3dchwevkyamcta",
"web": "https://replicate.com/p/zx94c9e1rnrmt0d1m94rrrvsrw"
},
"metrics": {
"model_variant": "h3",
"predict_time": 186.744374083,
"resolution_target": "2K",
"total_time": 186.759916168,
"video_output_count": 1,
"video_output_duration_seconds": 5
}
}