typefile
{
"fps": -1,
"height": -1,
"mask": "https://replicate.delivery/pbxt/JgGNe7IjsavH2is00AVgbEwWroEtseid6f3HZIHI7MJH9Num/bmx-trees-mask4.mp4",
"mask_dilation_iterations": 8,
"num_frames": -1,
"num_inference_steps": 6,
"video": "https://replicate.delivery/pbxt/JgGNdl0r9V14YxgJ4JlsCz71rSU9y8NJD9RDDdJo2Ua3r8C7/bmx-trees2.mp4",
"width": -1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_AtF**********************************
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 ayushunleashed/minimax-remover using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"ayushunleashed/minimax-remover:f486e4c1469ce3d5042ad74ab06b16138ae228ddb49b54ce050a14cb2f1beb58",
{
input: {
fps: -1,
height: -1,
mask: "https://replicate.delivery/pbxt/JgGNe7IjsavH2is00AVgbEwWroEtseid6f3HZIHI7MJH9Num/bmx-trees-mask4.mp4",
mask_dilation_iterations: 8,
num_frames: -1,
num_inference_steps: 6,
video: "https://replicate.delivery/pbxt/JgGNdl0r9V14YxgJ4JlsCz71rSU9y8NJD9RDDdJo2Ua3r8C7/bmx-trees2.mp4",
width: -1
}
}
);
// 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_AtF**********************************
This is your API token. Keep it to yourself.
import replicate
Run ayushunleashed/minimax-remover using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ayushunleashed/minimax-remover:f486e4c1469ce3d5042ad74ab06b16138ae228ddb49b54ce050a14cb2f1beb58",
input={
"fps": -1,
"height": -1,
"mask": "https://replicate.delivery/pbxt/JgGNe7IjsavH2is00AVgbEwWroEtseid6f3HZIHI7MJH9Num/bmx-trees-mask4.mp4",
"mask_dilation_iterations": 8,
"num_frames": -1,
"num_inference_steps": 6,
"video": "https://replicate.delivery/pbxt/JgGNdl0r9V14YxgJ4JlsCz71rSU9y8NJD9RDDdJo2Ua3r8C7/bmx-trees2.mp4",
"width": -1
}
)
# 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_AtF**********************************
This is your API token. Keep it to yourself.
Run ayushunleashed/minimax-remover 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 $'{
"version": "ayushunleashed/minimax-remover:f486e4c1469ce3d5042ad74ab06b16138ae228ddb49b54ce050a14cb2f1beb58",
"input": {
"fps": -1,
"height": -1,
"mask": "https://replicate.delivery/pbxt/JgGNe7IjsavH2is00AVgbEwWroEtseid6f3HZIHI7MJH9Num/bmx-trees-mask4.mp4",
"mask_dilation_iterations": 8,
"num_frames": -1,
"num_inference_steps": 6,
"video": "https://replicate.delivery/pbxt/JgGNdl0r9V14YxgJ4JlsCz71rSU9y8NJD9RDDdJo2Ua3r8C7/bmx-trees2.mp4",
"width": -1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "01dpynftwsrma0cqehpsjdbkp0",
"model": "ayushunleashed/minimax-remover",
"version": "f486e4c1469ce3d5042ad74ab06b16138ae228ddb49b54ce050a14cb2f1beb58",
"input": {
"fps": -1,
"height": -1,
"mask": "https://replicate.delivery/pbxt/JgGNe7IjsavH2is00AVgbEwWroEtseid6f3HZIHI7MJH9Num/bmx-trees-mask4.mp4",
"mask_dilation_iterations": 8,
"num_frames": -1,
"num_inference_steps": 6,
"video": "https://replicate.delivery/pbxt/JgGNdl0r9V14YxgJ4JlsCz71rSU9y8NJD9RDDdJo2Ua3r8C7/bmx-trees2.mp4",
"width": -1
},
"logs": "Using seed: 6788\nValidating input videos...\n📹 Processing 80 frames at 432x240\n🎬 Output FPS: 24 (original: 24.0)\n⚙️ Quality: 6 inference steps\n🎯 Mask dilation: 8 iterations\nLoading original video and mask...\nLoaded 80 frames from 80 total frames\nLoaded 80 mask frames\nVideo shape: torch.Size([80, 240, 432, 3])\nMask shape: torch.Size([80, 240, 432, 1])\nRunning MiniMax-Remover inference...\n 0%| | 0/6 [00:00<?, ?it/s]\n 17%|█▋ | 1/6 [00:00<00:02, 2.30it/s]\n 33%|███▎ | 2/6 [00:00<00:01, 2.94it/s]\n 50%|█████ | 3/6 [00:00<00:00, 3.15it/s]\n 67%|██████▋ | 4/6 [00:01<00:00, 3.34it/s]\n 83%|████████▎ | 5/6 [00:01<00:00, 3.45it/s]\n100%|██████████| 6/6 [00:01<00:00, 3.52it/s]\n100%|██████████| 6/6 [00:01<00:00, 3.30it/s]\nInference completed successfully!\nIt is recommended to use `export_to_video` with `imageio` and `imageio-ffmpeg` as a backend.\nThese libraries are not present in your environment. Attempting to use legacy OpenCV backend to export video.\nSupport for the OpenCV backend will be deprecated in a future Diffusers version\n✅ Video saved to: /tmp/tmpril9jgvo/output.mp4\n📊 Output: 77 frames at 24 FPS",
"output": "https://replicate.delivery/xezq/3icCty6IABJkC1ECTCoXmqiwmuLM79oxfwuq2OzAlRJdPlbKA/output.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-06-15T16:30:54.182Z",
"started_at": "2025-06-15T16:32:53.431172Z",
"completed_at": "2025-06-15T16:32:58.354069Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/01dpynftwsrma0cqehpsjdbkp0/cancel",
"get": "https://api.replicate.com/v1/predictions/01dpynftwsrma0cqehpsjdbkp0",
"stream": "https://stream.replicate.com/v1/files/bcwr-3oqsqlhrejbrxnvbm5i7ohfui5qm5o2ejlupcbtk7jzkbkl2skca",
"web": "https://replicate.com/p/01dpynftwsrma0cqehpsjdbkp0"
},
"metrics": {
"predict_time": 4.922897123,
"total_time": 124.172069
}
}