defaulta squirrel surfing while wearing shorts and sunglasses
typetext
{
"duration": 6,
"prompt": "A rainy night in downtown Tokyo, a woman in her 30s wearing a red trench coat runs through neon lit alleys. Her face is drenched with tears and rain as she desperately searches for someone. Reflections shimmer on the wet pavement, traffic blurs by as she stops beneath a glowing billboard, breathing heavily, eyes scanning the crowd"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_JAG**********************************
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-apps/hailuo-02-4k using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
duration: 6,
prompt: "A rainy night in downtown Tokyo, a woman in her 30s wearing a red trench coat runs through neon lit alleys. Her face is drenched with tears and rain as she desperately searches for someone. Reflections shimmer on the wet pavement, traffic blurs by as she stops beneath a glowing billboard, breathing heavily, eyes scanning the crowd"
};
const output = await replicate.run("minimax-apps/hailuo-02-4k", { 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_JAG**********************************
This is your API token. Keep it to yourself.
import replicate
Run minimax-apps/hailuo-02-4k using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"minimax-apps/hailuo-02-4k",
input={
"duration": 6,
"prompt": "A rainy night in downtown Tokyo, a woman in her 30s wearing a red trench coat runs through neon lit alleys. Her face is drenched with tears and rain as she desperately searches for someone. Reflections shimmer on the wet pavement, traffic blurs by as she stops beneath a glowing billboard, breathing heavily, eyes scanning the crowd"
}
)
# 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_JAG**********************************
This is your API token. Keep it to yourself.
Run minimax-apps/hailuo-02-4k 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": 6,
"prompt": "A rainy night in downtown Tokyo, a woman in her 30s wearing a red trench coat runs through neon lit alleys. Her face is drenched with tears and rain as she desperately searches for someone. Reflections shimmer on the wet pavement, traffic blurs by as she stops beneath a glowing billboard, breathing heavily, eyes scanning the crowd"
}
}' \
https://api.replicate.com/v1/models/minimax-apps/hailuo-02-4k/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "mv637kr5v1rmc0cr6mm8gywyd4",
"model": "minimax-apps/hailuo-02-4k",
"version": "hidden",
"input": {
"duration": 6,
"prompt": "A rainy night in downtown Tokyo, a woman in her 30s wearing a red trench coat runs through neon lit alleys. Her face is drenched with tears and rain as she desperately searches for someone. Reflections shimmer on the wet pavement, traffic blurs by as she stops beneath a glowing billboard, breathing heavily, eyes scanning the crowd"
},
"logs": "",
"output": "https://replicate.delivery/xezq/E01lKIjA1lo8BR6uRD2V7COaLaIMyfJGWfxry7Xe9eNu5fboC/tmpbbk_h0g1.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-07-23T02:41:12.152Z",
"started_at": "2025-07-23T02:41:12.662047Z",
"completed_at": "2025-07-23T02:48:59.691232Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/mv637kr5v1rmc0cr6mm8gywyd4/cancel",
"children": "https://api.replicate.com/v1/predictions/mv637kr5v1rmc0cr6mm8gywyd4/children",
"get": "https://api.replicate.com/v1/predictions/mv637kr5v1rmc0cr6mm8gywyd4",
"root": "https://api.replicate.com/v1/predictions/mv637kr5v1rmc0cr6mm8gywyd4",
"stream": "https://stream.replicate.com/v1/files/bcwr-krelqdmcrokqejopflavl3qzvwpl32dmvryug75polpfymvoqqxq",
"web": "https://replicate.com/p/mv637kr5v1rmc0cr6mm8gywyd4"
},
"metrics": {
"predict_time": 467.029185538,
"total_time": 467.539232
}
}