typetext
{
"duration": 5,
"first_frame_image": "https://replicate.delivery/xezq/ZRsqq4Vn8w5WPhxAbkpxx0wvFqpf498jQe6Jzz4kBWvrC8dXA/tmpdd5_9ux3.png",
"prompt": "The subway car rocks gently as it moves, fluorescent lights flickering, passing tunnel lights sweeping across the windows. The woman holds her glance over her shoulder, then turns to the man and smiles; he looks down at her and grins. Passengers in the background sway. Handheld 35mm film camera feel, soft grain.",
"resolution": "2K"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_SgB**********************************
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/ZRsqq4Vn8w5WPhxAbkpxx0wvFqpf498jQe6Jzz4kBWvrC8dXA/tmpdd5_9ux3.png",
prompt: "The subway car rocks gently as it moves, fluorescent lights flickering, passing tunnel lights sweeping across the windows. The woman holds her glance over her shoulder, then turns to the man and smiles; he looks down at her and grins. Passengers in the background sway. Handheld 35mm film camera feel, soft grain.",
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_SgB**********************************
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/ZRsqq4Vn8w5WPhxAbkpxx0wvFqpf498jQe6Jzz4kBWvrC8dXA/tmpdd5_9ux3.png",
"prompt": "The subway car rocks gently as it moves, fluorescent lights flickering, passing tunnel lights sweeping across the windows. The woman holds her glance over her shoulder, then turns to the man and smiles; he looks down at her and grins. Passengers in the background sway. Handheld 35mm film camera feel, soft grain.",
"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_SgB**********************************
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/ZRsqq4Vn8w5WPhxAbkpxx0wvFqpf498jQe6Jzz4kBWvrC8dXA/tmpdd5_9ux3.png",
"prompt": "The subway car rocks gently as it moves, fluorescent lights flickering, passing tunnel lights sweeping across the windows. The woman holds her glance over her shoulder, then turns to the man and smiles; he looks down at her and grins. Passengers in the background sway. Handheld 35mm film camera feel, soft grain.",
"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": "56vqfpdt55rmr0d1m94t8hnvf8",
"model": "minimax/h3",
"version": "hidden",
"input": {
"duration": 5,
"first_frame_image": "https://replicate.delivery/xezq/ZRsqq4Vn8w5WPhxAbkpxx0wvFqpf498jQe6Jzz4kBWvrC8dXA/tmpdd5_9ux3.png",
"prompt": "The subway car rocks gently as it moves, fluorescent lights flickering, passing tunnel lights sweeping across the windows. The woman holds her glance over her shoulder, then turns to the man and smiles; he looks down at her and grins. Passengers in the background sway. Handheld 35mm film camera feel, soft grain.",
"resolution": "2K"
},
"logs": "Generating video with MiniMax H3...\nDownloading 4355948 bytes\nDownloaded 4.15MB in 0.72sec",
"output": "https://replicate.delivery/xezq/6hi3fFCGazRIZCBDzDNXG3ADc2xjbpeKY8HyR5ezLOobM47uA/tmp6n99q6b8.mp4",
"data_removed": false,
"error": null,
"source": "api",
"status": "succeeded",
"created_at": "2026-11-03T16:41:43.209Z",
"started_at": "2026-11-03T16:41:43.230285Z",
"completed_at": "2026-11-03T16:45:02.95334Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/56vqfpdt55rmr0d1m94t8hnvf8/cancel",
"get": "https://api.replicate.com/v1/predictions/56vqfpdt55rmr0d1m94t8hnvf8",
"stream": "https://stream.replicate.com/v1/files/jbxs-cbzclxbf5sxblmeaahuglpb5llz3ifiqqlezejdv2tuk5tikanxa",
"web": "https://replicate.com/p/56vqfpdt55rmr0d1m94t8hnvf8"
},
"metrics": {
"model_variant": "h3",
"predict_time": 199.723055106,
"resolution_target": "2K",
"total_time": 199.744340424,
"video_output_count": 1,
"video_output_duration_seconds": 5
}
}