typefile
{
"output_format": "mp4",
"quality": "medium",
"target_size_mb": 2,
"video": "https://replicate.delivery/pbxt/Nsqi0XjMEV2V4hQvOLyzqT1UXsexmXQPshb1FpudOAltfhRN/replicate-prediction-zz6r0wtn61rma0csg8tr2qnnew.mp4"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_L37**********************************
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 lucataco/featured-vid using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
output_format: "mp4",
quality: "medium",
target_size_mb: 2,
video: "https://replicate.delivery/pbxt/Nsqi0XjMEV2V4hQvOLyzqT1UXsexmXQPshb1FpudOAltfhRN/replicate-prediction-zz6r0wtn61rma0csg8tr2qnnew.mp4"
};
const output = await replicate.run("lucataco/featured-vid", { 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_L37**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/featured-vid using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/featured-vid",
input={
"output_format": "mp4",
"quality": "medium",
"target_size_mb": 2,
"video": "https://replicate.delivery/pbxt/Nsqi0XjMEV2V4hQvOLyzqT1UXsexmXQPshb1FpudOAltfhRN/replicate-prediction-zz6r0wtn61rma0csg8tr2qnnew.mp4"
}
)
# 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_L37**********************************
This is your API token. Keep it to yourself.
Run lucataco/featured-vid 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": {
"output_format": "mp4",
"quality": "medium",
"target_size_mb": 2,
"video": "https://replicate.delivery/pbxt/Nsqi0XjMEV2V4hQvOLyzqT1UXsexmXQPshb1FpudOAltfhRN/replicate-prediction-zz6r0wtn61rma0csg8tr2qnnew.mp4"
}
}' \
https://api.replicate.com/v1/models/lucataco/featured-vid/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "qn9m7ebh8nrm80cswcyte0cz0w",
"model": "lucataco/featured-vid",
"version": "hidden",
"input": {
"output_format": "mp4",
"quality": "medium",
"target_size_mb": 2,
"video": "https://replicate.delivery/pbxt/Nsqi0XjMEV2V4hQvOLyzqT1UXsexmXQPshb1FpudOAltfhRN/replicate-prediction-zz6r0wtn61rma0csg8tr2qnnew.mp4"
},
"logs": "Original size: 12.65 MB\nCompressed size: 1.09 MB\nTarget size: 2.00 MB\nResolution: 1920x1080 → 1280x720\nDuration: 5.04 seconds",
"output": "https://replicate.delivery/xezq/W60reUVCYCxeZElSsYClAVyAx5YP1NsV2exSmkbmOSpKeF8VB/compressed_video.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-10-14T15:01:18.789Z",
"started_at": "2025-10-14T15:01:19.256244Z",
"completed_at": "2025-10-14T15:01:25.61542Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/qn9m7ebh8nrm80cswcyte0cz0w/cancel",
"children": "https://api.replicate.com/v1/predictions/qn9m7ebh8nrm80cswcyte0cz0w/children",
"get": "https://api.replicate.com/v1/predictions/qn9m7ebh8nrm80cswcyte0cz0w",
"root": "https://api.replicate.com/v1/predictions/qn9m7ebh8nrm80cswcyte0cz0w",
"stream": "https://stream.replicate.com/v1/files/bcwr-3gjh4hlvqioa5jcu3bc2xzcqkxin6ilzwu63fjno4lj5rtq7epiq",
"web": "https://replicate.com/p/qn9m7ebh8nrm80cswcyte0cz0w"
},
"metrics": {
"predict_time": 6.359175244,
"total_time": 6.82642
}
}