typetext
{
"aspect_ratio": "16:9",
"duration": 10,
"prompt": "A dense, verdant jungle world made up of small lego-like pieces. We see a rainbow chameleon running through the 3D world, the camera in and out of focus."
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Ed9**********************************
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 runwayml/gen-4.5 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "16:9",
duration: 10,
prompt: "A dense, verdant jungle world made up of small lego-like pieces. We see a rainbow chameleon running through the 3D world, the camera in and out of focus."
};
const output = await replicate.run("runwayml/gen-4.5", { 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_Ed9**********************************
This is your API token. Keep it to yourself.
import replicate
Run runwayml/gen-4.5 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"runwayml/gen-4.5",
input={
"aspect_ratio": "16:9",
"duration": 10,
"prompt": "A dense, verdant jungle world made up of small lego-like pieces. We see a rainbow chameleon running through the 3D world, the camera in and out of focus."
}
)
# 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_Ed9**********************************
This is your API token. Keep it to yourself.
Run runwayml/gen-4.5 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": "16:9",
"duration": 10,
"prompt": "A dense, verdant jungle world made up of small lego-like pieces. We see a rainbow chameleon running through the 3D world, the camera in and out of focus."
}
}' \
https://api.replicate.com/v1/models/runwayml/gen-4.5/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "3w3dfb5wxdrmw0cwdt1v9ngfw0",
"model": "runwayml/gen-4.5",
"version": "hidden",
"input": {
"aspect_ratio": "16:9",
"duration": 10,
"prompt": "A dense, verdant jungle world made up of small lego-like pieces. We see a rainbow chameleon running through the 3D world, the camera in and out of focus."
},
"logs": "Using seed: 1708253727\nGenerating text-to-video with ratio 1280:720 (16:9), duration 10s\nWarning: No OID set\nGenerating video...\n0%\n2%\n4%\n6%\n7%\n9%\n11%\n14%\n16%\n19%\n22%\n25%\n27%\n30%\n33%\n35%\n38%\n41%\n43%\n46%\n50%\n52%\n63%\n75%\n86%\nGenerated video in 227.0sec\nDownloading 7440244 bytes\nDownloaded 7.10MB in 0.24sec",
"output": "https://replicate.delivery/xezq/AlfC7qolTq1YXysS5Aak9WavhusB7WtrgUu6GEpZCoBIlWELA/tmp82ivy7af.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2026-02-18T02:10:53.291Z",
"started_at": "2026-02-18T02:10:53.302034Z",
"completed_at": "2026-02-18T02:14:41.950881Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/3w3dfb5wxdrmw0cwdt1v9ngfw0/cancel",
"get": "https://api.replicate.com/v1/predictions/3w3dfb5wxdrmw0cwdt1v9ngfw0",
"stream": "https://stream.replicate.com/v1/files/jbxs-y3jrakh2kv6z4kkby46acigxuwcurlwhh34vvxy325w5gmd7cwaa",
"web": "https://replicate.com/p/3w3dfb5wxdrmw0cwdt1v9ngfw0"
},
"metrics": {
"predict_time": 228.64884738,
"total_time": 228.659881519
}
}