typefile
{
"aspect_ratio": "match_input_image",
"image": "https://replicate.delivery/pbxt/O3VHpkdBJfys2t9Vs8a1B2ElBLY5US6zvkhAZaYK6m1QD3CQ/replicate-prediction-sxzfjk7m41rma0ctfq3s2j8ss4.jpg",
"lora_scale": 0.8,
"output_format": "webp",
"output_quality": 95,
"prompt": "Next Scene: The camera zooms in on the man as he looks away from the window with his hand on the back of his neck"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Ov4**********************************
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/next-scene using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "match_input_image",
image: "https://replicate.delivery/pbxt/O3VHpkdBJfys2t9Vs8a1B2ElBLY5US6zvkhAZaYK6m1QD3CQ/replicate-prediction-sxzfjk7m41rma0ctfq3s2j8ss4.jpg",
lora_scale: 0.8,
output_format: "webp",
output_quality: 95,
prompt: "Next Scene: The camera zooms in on the man as he looks away from the window with his hand on the back of his neck"
};
const output = await replicate.run("lucataco/next-scene", { input });
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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_Ov4**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/next-scene using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/next-scene",
input={
"aspect_ratio": "match_input_image",
"image": "https://replicate.delivery/pbxt/O3VHpkdBJfys2t9Vs8a1B2ElBLY5US6zvkhAZaYK6m1QD3CQ/replicate-prediction-sxzfjk7m41rma0ctfq3s2j8ss4.jpg",
"lora_scale": 0.8,
"output_format": "webp",
"output_quality": 95,
"prompt": "Next Scene: The camera zooms in on the man as he looks away from the window with his hand on the back of his neck"
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_Ov4**********************************
This is your API token. Keep it to yourself.
Run lucataco/next-scene 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": {
"aspect_ratio": "match_input_image",
"image": "https://replicate.delivery/pbxt/O3VHpkdBJfys2t9Vs8a1B2ElBLY5US6zvkhAZaYK6m1QD3CQ/replicate-prediction-sxzfjk7m41rma0ctfq3s2j8ss4.jpg",
"lora_scale": 0.8,
"output_format": "webp",
"output_quality": 95,
"prompt": "Next Scene: The camera zooms in on the man as he looks away from the window with his hand on the back of his neck"
}
}' \
https://api.replicate.com/v1/models/lucataco/next-scene/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "pnnp8knrzsrmc0ctfq8sen11ew",
"model": "lucataco/next-scene",
"version": "hidden",
"input": {
"aspect_ratio": "match_input_image",
"image": "https://replicate.delivery/pbxt/O3VHpkdBJfys2t9Vs8a1B2ElBLY5US6zvkhAZaYK6m1QD3CQ/replicate-prediction-sxzfjk7m41rma0ctfq3s2j8ss4.jpg",
"lora_scale": 0.8,
"output_format": "webp",
"output_quality": 95,
"prompt": "Next Scene: The camera zooms in on the man as he looks away from the window with his hand on the back of his neck"
},
"logs": "",
"output": [
"https://replicate.delivery/xezq/sQ6vuhDISMoxDV0HIx71IFwIzcU06FFdjXRgGdMERXxSqOaF/out-0.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-11-13T15:24:47.742Z",
"started_at": "2025-11-13T15:24:48.119704Z",
"completed_at": "2025-11-13T15:24:59.460054Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/pnnp8knrzsrmc0ctfq8sen11ew/cancel",
"children": "https://api.replicate.com/v1/predictions/pnnp8knrzsrmc0ctfq8sen11ew/children",
"get": "https://api.replicate.com/v1/predictions/pnnp8knrzsrmc0ctfq8sen11ew",
"root": "https://api.replicate.com/v1/predictions/pnnp8knrzsrmc0ctfq8sen11ew",
"stream": "https://stream.replicate.com/v1/files/bcwr-pmnn7adpck2mesbjrai37dj7n5m2eszb33sdicn3fvqerfhephba",
"web": "https://replicate.com/p/pnnp8knrzsrmc0ctfq8sen11ew"
},
"metrics": {
"predict_time": 11.340350007,
"total_time": 11.718054643
}
}
