typetext
{
"prompt": "a woman is walking through a busy Tokyo street at night, she is wearing dark sunglasses",
"prompt_optimizer": true
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_f2g**********************************
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/video-01 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
prompt: "a woman is walking through a busy Tokyo street at night, she is wearing dark sunglasses",
prompt_optimizer: true
};
const output = await replicate.run("minimax/video-01", { 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_f2g**********************************
This is your API token. Keep it to yourself.
import replicate
Run minimax/video-01 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"minimax/video-01",
input={
"prompt": "a woman is walking through a busy Tokyo street at night, she is wearing dark sunglasses",
"prompt_optimizer": True
}
)
# 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_f2g**********************************
This is your API token. Keep it to yourself.
Run minimax/video-01 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": {
"prompt": "a woman is walking through a busy Tokyo street at night, she is wearing dark sunglasses",
"prompt_optimizer": true
}
}' \
https://api.replicate.com/v1/models/minimax/video-01/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "qxzw7z02tdrm80cqgzyb7g1me4",
"model": "minimax/video-01",
"version": "hidden",
"input": {
"prompt": "a woman is walking through a busy Tokyo street at night, she is wearing dark sunglasses",
"prompt_optimizer": true
},
"logs": "Generating video...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nGenerated video in 153.4sec\nRetrieving file...\nDownloading 1901912 bytes\nDownloaded 1.81MB in 2.69sec",
"output": "https://replicate.delivery/xezq/sKwL789E0KrLCZFX8oVqO6dQfP952RZFhuwGRt1cyICzSNcKA/tmppyhy1cg1.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-06-19T11:38:49.427Z",
"started_at": "2025-06-19T11:38:49.448649Z",
"completed_at": "2025-06-19T11:41:26.310112Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/qxzw7z02tdrm80cqgzyb7g1me4/cancel",
"get": "https://api.replicate.com/v1/predictions/qxzw7z02tdrm80cqgzyb7g1me4",
"stream": "https://stream.replicate.com/v1/files/bcwr-sehz47wpsx52o5l675vbfomyzsnqhlrudx3b4ddzoxgsyjcvknjq",
"web": "https://replicate.com/p/qxzw7z02tdrm80cqgzyb7g1me4"
},
"metrics": {
"predict_time": 156.86146286,
"total_time": 156.883112
}
}