typetext
{
"prompt": "a woman is walking through a busy Tokyo street at night",
"prompt_optimizer": true,
"subject_reference": "https://replicate.delivery/pbxt/MMAQ6u133N7ozvrpfb4ffzAri6lWRww4hDFFbkAmyTRd77r7/0_1.webp"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_awT**********************************
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",
prompt_optimizer: true,
subject_reference: "https://replicate.delivery/pbxt/MMAQ6u133N7ozvrpfb4ffzAri6lWRww4hDFFbkAmyTRd77r7/0_1.webp"
};
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_awT**********************************
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",
"prompt_optimizer": True,
"subject_reference": "https://replicate.delivery/pbxt/MMAQ6u133N7ozvrpfb4ffzAri6lWRww4hDFFbkAmyTRd77r7/0_1.webp"
}
)
# 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_awT**********************************
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",
"prompt_optimizer": true,
"subject_reference": "https://replicate.delivery/pbxt/MMAQ6u133N7ozvrpfb4ffzAri6lWRww4hDFFbkAmyTRd77r7/0_1.webp"
}
}' \
https://api.replicate.com/v1/models/minimax/video-01/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "y5nxhm3nwnrgc0cmgp792rk9xm",
"model": "minimax/video-01",
"version": "hidden",
"input": {
"prompt": "a woman is walking through a busy Tokyo street at night",
"prompt_optimizer": true,
"subject_reference": "https://replicate.delivery/pbxt/MMAQ6u133N7ozvrpfb4ffzAri6lWRww4hDFFbkAmyTRd77r7/0_1.webp"
},
"logs": "Moderating content...\nModeration complete in 0.25sec\nRunning prediction... \nInitializing video generation with prompt: a woman is walking through a busy Tokyo street at night\nUsing model: S2V-01\nGenerating video...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nGenerated video in 215.9sec\nRetrieving video...\nDownloading 2308532 bytes\nDownloaded 2.20MB in 2.47sec",
"output": "https://replicate.delivery/czjl/UBOc7xjfNdyeZkDZvuYnotM4V77KspV3Uf19PyDfcPkBubcQB/tmpe9s3f5tx.output.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-01-20T21:11:33.605Z",
"started_at": "2025-01-20T21:11:33.614066Z",
"completed_at": "2025-01-20T21:15:12.483551Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/y5nxhm3nwnrgc0cmgp792rk9xm/cancel",
"get": "https://api.replicate.com/v1/predictions/y5nxhm3nwnrgc0cmgp792rk9xm",
"stream": "https://stream.replicate.com/v1/files/fddq-u62p5fq6mpudza5ptysdzbokaixoswy37p66hkzywvc2htyoeyoq",
"web": "https://replicate.com/p/y5nxhm3nwnrgc0cmgp792rk9xm"
},
"metrics": {
"predict_time": 218.869485022,
"total_time": 218.878551
}
}