typetext
{
"fifth_location": "The Moon",
"first_location": "Abu Dhabi",
"fourth_location": "Nuuk, Greenland",
"second_location": "Lisbon, Portugal",
"third_location": "Macao, China"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_7qL**********************************
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 8w9ag/tom-cruise-runs using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
fifth_location: "The Moon",
first_location: "Abu Dhabi",
fourth_location: "Nuuk, Greenland",
second_location: "Lisbon, Portugal",
third_location: "Macao, China"
};
const output = await replicate.run("8w9ag/tom-cruise-runs", { 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_7qL**********************************
This is your API token. Keep it to yourself.
import replicate
Run 8w9ag/tom-cruise-runs using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"8w9ag/tom-cruise-runs",
input={
"fifth_location": "The Moon",
"first_location": "Abu Dhabi",
"fourth_location": "Nuuk, Greenland",
"second_location": "Lisbon, Portugal",
"third_location": "Macao, China"
}
)
# 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_7qL**********************************
This is your API token. Keep it to yourself.
Run 8w9ag/tom-cruise-runs 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": {
"fifth_location": "The Moon",
"first_location": "Abu Dhabi",
"fourth_location": "Nuuk, Greenland",
"second_location": "Lisbon, Portugal",
"third_location": "Macao, China"
}
}' \
https://api.replicate.com/v1/models/8w9ag/tom-cruise-runs/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "m4ch01f6ksrmc0crc83s83zjbw",
"model": "8w9ag/tom-cruise-runs",
"version": "hidden",
"input": {
"fifth_location": "The Moon",
"first_location": "Abu Dhabi",
"fourth_location": "Nuuk, Greenland",
"second_location": "Lisbon, Portugal",
"third_location": "Macao, China"
},
"logs": "Processing location: Abu Dhabi\nProcessing location: Lisbon, Portugal\nProcessing location: Macao, China\nProcessing location: Nuuk, Greenland\nProcessing location: The Moon\nMoviePy - Building video tom-cruise.mp4.\nMoviePy - Writing audio in tom-cruiseTEMP_MPY_wvf_snd.mp3\n\nchunk: 0%| | 0/556 [00:00<?, ?it/s, now=None]\nchunk: 29%|██▉ | 160/556 [00:00<00:00, 1565.00it/s, now=None]\nchunk: 57%|█████▋ | 317/556 [00:00<00:00, 1355.50it/s, now=None]\nchunk: 82%|████████▏ | 455/556 [00:00<00:00, 1305.08it/s, now=None]\n \nMoviePy - Done.\nMoviePy - Writing video tom-cruise.mp4\n\n\nframe_index: 0%| | 0/604 [00:00<?, ?it/s, now=None]\nframe_index: 1%| | 7/604 [00:00<00:08, 69.00it/s, now=None]\nframe_index: 2%|▏ | 14/604 [00:00<00:08, 65.83it/s, now=None]\nframe_index: 3%|▎ | 21/604 [00:00<00:08, 65.77it/s, now=None]\nframe_index: 5%|▍ | 28/604 [00:00<00:08, 65.11it/s, now=None]\nframe_index: 6%|▌ | 35/604 [00:00<00:08, 65.23it/s, now=None]\nframe_index: 7%|▋ | 42/604 [00:00<00:08, 64.06it/s, now=None]\nframe_index: 8%|▊ | 49/604 [00:00<00:10, 51.93it/s, now=None]\nframe_index: 9%|▉ | 55/604 [00:01<00:11, 45.80it/s, now=None]\nframe_index: 10%|▉ | 60/604 [00:01<00:12, 42.34it/s, now=None]\nframe_index: 11%|█ | 65/604 [00:01<00:13, 39.44it/s, now=None]\nframe_index: 12%|█▏ | 70/604 [00:01<00:13, 38.67it/s, now=None]\nframe_index: 12%|█▏ | 74/604 [00:01<00:13, 37.87it/s, now=None]\nframe_index: 13%|█▎ | 78/604 [00:01<00:14, 37.53it/s, now=None]\nframe_index: 14%|█▎ | 82/604 [00:01<00:13, 37.37it/s, now=None]\nframe_index: 14%|█▍ | 86/604 [00:01<00:14, 35.97it/s, now=None]\nframe_index: 15%|█▍ | 90/604 [00:01<00:14, 36.27it/s, now=None]\nframe_index: 16%|█▌ | 94/604 [00:02<00:14, 36.14it/s, now=None]\nframe_index: 16%|█▋ | 99/604 [00:02<00:13, 37.08it/s, now=None]\nframe_index: 17%|█▋ | 103/604 [00:02<00:13, 37.82it/s, now=None]\nframe_index: 18%|█▊ | 107/604 [00:02<00:12, 38.24it/s, now=None]\nframe_index: 18%|█▊ | 111/604 [00:02<00:13, 37.17it/s, now=None]\nframe_index: 19%|█▉ | 115/604 [00:02<00:14, 33.19it/s, now=None]\nframe_index: 20%|█▉ | 119/604 [00:02<00:15, 31.79it/s, now=None]\nframe_index: 20%|██ | 123/604 [00:03<00:16, 28.57it/s, now=None]\nframe_index: 21%|██ | 126/604 [00:03<00:17, 27.08it/s, now=None]\nframe_index: 21%|██▏ | 129/604 [00:03<00:17, 26.68it/s, now=None]\nframe_index: 22%|██▏ | 132/604 [00:03<00:17, 26.94it/s, now=None]\nframe_index: 22%|██▏ | 135/604 [00:03<00:17, 27.14it/s, now=None]\nframe_index: 23%|██▎ | 139/604 [00:03<00:16, 27.61it/s, now=None]\nframe_index: 24%|██▎ | 142/604 [00:03<00:16, 28.09it/s, now=None]\nframe_index: 24%|██▍ | 145/604 [00:03<00:16, 28.29it/s, now=None]\nframe_index: 25%|██▍ | 148/604 [00:03<00:15, 28.59it/s, now=None]\nframe_index: 25%|██▌ | 152/604 [00:04<00:15, 28.90it/s, now=None]\nframe_index: 26%|██▌ | 155/604 [00:04<00:15, 28.46it/s, now=None]\nframe_index: 26%|██▌ | 158/604 [00:04<00:16, 27.07it/s, now=None]\nframe_index: 27%|██▋ | 161/604 [00:04<00:16, 26.54it/s, now=None]\nframe_index: 27%|██▋ | 164/604 [00:04<00:16, 26.23it/s, now=None]\nframe_index: 28%|██▊ | 167/604 [00:04<00:16, 26.48it/s, now=None]\nframe_index: 28%|██▊ | 170/604 [00:04<00:16, 27.04it/s, now=None]\nframe_index: 29%|██▉ | 174/604 [00:04<00:15, 28.30it/s, now=None]\nframe_index: 29%|██▉ | 177/604 [00:04<00:15, 27.85it/s, now=None]\nframe_index: 30%|██▉ | 181/604 [00:05<00:15, 28.11it/s, now=None]\nframe_index: 30%|███ | 184/604 [00:05<00:14, 28.00it/s, now=None]\nframe_index: 31%|███ | 187/604 [00:05<00:15, 27.71it/s, now=None]\nframe_index: 31%|███▏ | 190/604 [00:05<00:15, 27.45it/s, now=None]\nframe_index: 32%|███▏ | 194/604 [00:05<00:14, 27.63it/s, now=None]\nframe_index: 33%|███▎ | 197/604 [00:05<00:14, 27.56it/s, now=None]\nframe_index: 33%|███▎ | 200/604 [00:05<00:14, 27.47it/s, now=None]\nframe_index: 34%|███▎ | 203/604 [00:05<00:14, 27.43it/s, now=None]\nframe_index: 34%|███▍ | 206/604 [00:06<00:14, 27.62it/s, now=None]\nframe_index: 35%|███▍ | 209/604 [00:06<00:14, 27.83it/s, now=None]\nframe_index: 35%|███▌ | 212/604 [00:06<00:14, 27.75it/s, now=None]\nframe_index: 36%|███▌ | 215/604 [00:06<00:14, 27.60it/s, now=None]\nframe_index: 36%|███▌ | 218/604 [00:06<00:13, 27.99it/s, now=None]\nframe_index: 37%|███▋ | 221/604 [00:06<00:13, 28.24it/s, now=None]\nframe_index: 37%|███▋ | 224/604 [00:06<00:14, 27.13it/s, now=None]\nframe_index: 38%|███▊ | 228/604 [00:06<00:12, 29.13it/s, now=None]\nframe_index: 38%|███▊ | 231/604 [00:06<00:12, 28.99it/s, now=None]\nframe_index: 39%|███▉ | 235/604 [00:07<00:12, 30.01it/s, now=None]\nframe_index: 40%|███▉ | 239/604 [00:07<00:11, 31.14it/s, now=None]\nframe_index: 40%|████ | 243/604 [00:07<00:11, 30.33it/s, now=None]\nframe_index: 41%|████ | 247/604 [00:07<00:13, 26.90it/s, now=None]\nframe_index: 41%|████▏ | 250/604 [00:07<00:12, 27.61it/s, now=None]\nframe_index: 42%|████▏ | 253/604 [00:07<00:12, 28.07it/s, now=None]\nframe_index: 43%|████▎ | 257/604 [00:07<00:11, 29.40it/s, now=None]\nframe_index: 43%|████▎ | 260/604 [00:07<00:11, 29.35it/s, now=None]\nframe_index: 44%|████▎ | 263/604 [00:08<00:12, 28.30it/s, now=None]\nframe_index: 44%|████▍ | 266/604 [00:08<00:12, 27.62it/s, now=None]\nframe_index: 45%|████▍ | 269/604 [00:08<00:12, 26.57it/s, now=None]\nframe_index: 45%|████▌ | 272/604 [00:08<00:13, 25.14it/s, now=None]\nframe_index: 46%|████▌ | 275/604 [00:08<00:12, 25.45it/s, now=None]\nframe_index: 46%|████▌ | 278/604 [00:08<00:12, 26.21it/s, now=None]\nframe_index: 47%|████▋ | 281/604 [00:08<00:12, 26.36it/s, now=None]\nframe_index: 47%|████▋ | 285/604 [00:08<00:11, 27.61it/s, now=None]\nframe_index: 48%|████▊ | 288/604 [00:08<00:11, 27.76it/s, now=None]\nframe_index: 48%|████▊ | 291/604 [00:09<00:11, 27.19it/s, now=None]\nframe_index: 49%|████▊ | 294/604 [00:09<00:11, 27.02it/s, now=None]\nframe_index: 49%|████▉ | 297/604 [00:09<00:11, 27.25it/s, now=None]\nframe_index: 50%|████▉ | 300/604 [00:09<00:11, 27.09it/s, now=None]\nframe_index: 50%|█████ | 303/604 [00:09<00:11, 27.09it/s, now=None]\nframe_index: 51%|█████ | 306/604 [00:09<00:11, 26.41it/s, now=None]\nframe_index: 51%|█████ | 309/604 [00:09<00:11, 26.52it/s, now=None]\nframe_index: 52%|█████▏ | 312/604 [00:09<00:11, 25.24it/s, now=None]\nframe_index: 52%|█████▏ | 316/604 [00:10<00:10, 26.34it/s, now=None]\nframe_index: 53%|█████▎ | 319/604 [00:10<00:11, 25.52it/s, now=None]\nframe_index: 53%|█████▎ | 322/604 [00:10<00:10, 25.73it/s, now=None]\nframe_index: 54%|█████▍ | 325/604 [00:10<00:11, 25.31it/s, now=None]\nframe_index: 54%|█████▍ | 328/604 [00:10<00:10, 25.53it/s, now=None]\nframe_index: 55%|█████▍ | 331/604 [00:10<00:10, 24.99it/s, now=None]\nframe_index: 55%|█████▌ | 334/604 [00:10<00:10, 24.80it/s, now=None]\nframe_index: 56%|█████▌ | 337/604 [00:10<00:10, 25.01it/s, now=None]\nframe_index: 56%|█████▋ | 340/604 [00:11<00:10, 25.15it/s, now=None]\nframe_index: 57%|█████▋ | 343/604 [00:11<00:10, 25.60it/s, now=None]\nframe_index: 57%|█████▋ | 346/604 [00:11<00:09, 26.18it/s, now=None]\nframe_index: 58%|█████▊ | 349/604 [00:11<00:09, 26.42it/s, now=None]\nframe_index: 58%|█████▊ | 352/604 [00:11<00:09, 26.36it/s, now=None]\nframe_index: 59%|█████▉ | 355/604 [00:11<00:09, 26.38it/s, now=None]\nframe_index: 59%|█████▉ | 358/604 [00:11<00:09, 26.61it/s, now=None]\nframe_index: 60%|█████▉ | 361/604 [00:11<00:09, 26.83it/s, now=None]\nframe_index: 60%|██████ | 364/604 [00:11<00:09, 26.61it/s, now=None]\nframe_index: 61%|██████ | 367/604 [00:12<00:10, 23.64it/s, now=None]\nframe_index: 61%|██████▏ | 370/604 [00:12<00:09, 24.49it/s, now=None]\nframe_index: 62%|██████▏ | 373/604 [00:12<00:09, 25.32it/s, now=None]\nframe_index: 62%|██████▏ | 376/604 [00:12<00:08, 25.57it/s, now=None]\nframe_index: 63%|██████▎ | 379/604 [00:12<00:08, 26.21it/s, now=None]\nframe_index: 63%|██████▎ | 382/604 [00:12<00:08, 26.42it/s, now=None]\nframe_index: 64%|██████▎ | 385/604 [00:12<00:08, 26.67it/s, now=None]\nframe_index: 64%|██████▍ | 388/604 [00:12<00:08, 26.22it/s, now=None]\nframe_index: 65%|██████▍ | 391/604 [00:12<00:08, 25.65it/s, now=None]\nframe_index: 65%|██████▌ | 394/604 [00:13<00:08, 25.35it/s, now=None]\nframe_index: 66%|██████▌ | 397/604 [00:13<00:08, 25.70it/s, now=None]\nframe_index: 66%|██████▌ | 400/604 [00:13<00:07, 26.11it/s, now=None]\nframe_index: 67%|██████▋ | 403/604 [00:13<00:07, 26.29it/s, now=None]\nframe_index: 67%|██████▋ | 406/604 [00:13<00:07, 26.39it/s, now=None]\nframe_index: 68%|██████▊ | 409/604 [00:13<00:07, 26.13it/s, now=None]\nframe_index: 68%|██████▊ | 412/604 [00:13<00:07, 26.34it/s, now=None]\nframe_index: 69%|██████▊ | 415/604 [00:13<00:07, 26.58it/s, now=None]\nframe_index: 69%|██████▉ | 418/604 [00:13<00:06, 26.65it/s, now=None]\nframe_index: 70%|██████▉ | 421/604 [00:14<00:06, 26.67it/s, now=None]\nframe_index: 70%|███████ | 424/604 [00:14<00:06, 26.62it/s, now=None]\nframe_index: 71%|███████ | 427/604 [00:14<00:06, 26.61it/s, now=None]\nframe_index: 71%|███████ | 430/604 [00:14<00:06, 25.16it/s, now=None]\nframe_index: 72%|███████▏ | 433/604 [00:14<00:06, 25.05it/s, now=None]\nframe_index: 72%|███████▏ | 436/604 [00:14<00:06, 26.30it/s, now=None]\nframe_index: 73%|███████▎ | 439/604 [00:14<00:06, 26.43it/s, now=None]\nframe_index: 73%|███████▎ | 442/604 [00:14<00:06, 26.92it/s, now=None]\nframe_index: 74%|███████▎ | 445/604 [00:15<00:05, 27.34it/s, now=None]\nframe_index: 74%|███████▍ | 448/604 [00:15<00:05, 27.73it/s, now=None]\nframe_index: 75%|███████▍ | 451/604 [00:15<00:05, 27.94it/s, now=None]\nframe_index: 75%|███████▌ | 454/604 [00:15<00:05, 28.08it/s, now=None]\nframe_index: 76%|███████▌ | 457/604 [00:15<00:05, 27.91it/s, now=None]\nframe_index: 76%|███████▌ | 460/604 [00:15<00:05, 28.18it/s, now=None]\nframe_index: 77%|███████▋ | 463/604 [00:15<00:05, 28.10it/s, now=None]\nframe_index: 77%|███████▋ | 466/604 [00:15<00:04, 28.16it/s, now=None]\nframe_index: 78%|███████▊ | 469/604 [00:15<00:04, 27.77it/s, now=None]\nframe_index: 78%|███████▊ | 472/604 [00:15<00:04, 27.87it/s, now=None]\nframe_index: 79%|███████▊ | 475/604 [00:16<00:04, 27.92it/s, now=None]\nframe_index: 79%|███████▉ | 478/604 [00:16<00:04, 28.19it/s, now=None]\nframe_index: 80%|███████▉ | 481/604 [00:16<00:04, 28.14it/s, now=None]\nframe_index: 80%|████████ | 484/604 [00:16<00:04, 27.83it/s, now=None]\nframe_index: 81%|████████ | 487/604 [00:16<00:04, 24.61it/s, now=None]\nframe_index: 81%|████████ | 490/604 [00:16<00:04, 25.05it/s, now=None]\nframe_index: 82%|████████▏ | 493/604 [00:16<00:04, 25.47it/s, now=None]\nframe_index: 82%|████████▏ | 496/604 [00:16<00:04, 25.48it/s, now=None]\nframe_index: 83%|████████▎ | 499/604 [00:17<00:04, 25.98it/s, now=None]\nframe_index: 83%|████████▎ | 502/604 [00:17<00:03, 26.08it/s, now=None]\nframe_index: 84%|████████▎ | 505/604 [00:17<00:03, 26.41it/s, now=None]\nframe_index: 84%|████████▍ | 508/604 [00:17<00:03, 27.08it/s, now=None]\nframe_index: 85%|████████▍ | 511/604 [00:17<00:03, 27.54it/s, now=None]\nframe_index: 85%|████████▌ | 514/604 [00:17<00:03, 27.24it/s, now=None]\nframe_index: 86%|████████▌ | 517/604 [00:17<00:03, 26.75it/s, now=None]\nframe_index: 86%|████████▌ | 520/604 [00:17<00:03, 26.72it/s, now=None]\nframe_index: 87%|████████▋ | 524/604 [00:17<00:02, 27.11it/s, now=None]\nframe_index: 87%|████████▋ | 528/604 [00:18<00:02, 27.75it/s, now=None]\nframe_index: 88%|████████▊ | 532/604 [00:18<00:02, 28.50it/s, now=None]\nframe_index: 89%|████████▊ | 536/604 [00:18<00:02, 28.97it/s, now=None]\nframe_index: 89%|████████▉ | 539/604 [00:18<00:02, 28.97it/s, now=None]\nframe_index: 90%|████████▉ | 543/604 [00:18<00:02, 29.18it/s, now=None]\nframe_index: 90%|█████████ | 546/604 [00:18<00:02, 28.83it/s, now=None]\nframe_index: 91%|█████████ | 549/604 [00:18<00:01, 28.59it/s, now=None]\nframe_index: 91%|█████████▏| 552/604 [00:18<00:01, 27.85it/s, now=None]\nframe_index: 92%|█████████▏| 555/604 [00:19<00:01, 26.74it/s, now=None]\nframe_index: 93%|█████████▎| 559/604 [00:19<00:01, 28.03it/s, now=None]\nframe_index: 93%|█████████▎| 562/604 [00:19<00:01, 27.97it/s, now=None]\nframe_index: 94%|█████████▎| 566/604 [00:19<00:01, 28.55it/s, now=None]\nframe_index: 94%|█████████▍| 569/604 [00:19<00:01, 28.63it/s, now=None]\nframe_index: 95%|█████████▍| 572/604 [00:19<00:01, 28.03it/s, now=None]\nframe_index: 95%|█████████▌| 575/604 [00:19<00:01, 28.39it/s, now=None]\nframe_index: 96%|█████████▌| 578/604 [00:19<00:00, 28.31it/s, now=None]\nframe_index: 96%|█████████▌| 581/604 [00:19<00:00, 28.65it/s, now=None]\nframe_index: 97%|█████████▋| 584/604 [00:20<00:00, 28.58it/s, now=None]\nframe_index: 97%|█████████▋| 587/604 [00:20<00:00, 28.79it/s, now=None]\nframe_index: 98%|█████████▊| 590/604 [00:20<00:00, 29.09it/s, now=None]\nframe_index: 98%|█████████▊| 593/604 [00:20<00:00, 29.19it/s, now=None]\nframe_index: 99%|█████████▊| 596/604 [00:20<00:00, 29.20it/s, now=None]\nframe_index: 99%|█████████▉| 599/604 [00:20<00:00, 29.35it/s, now=None]\nframe_index: 100%|█████████▉| 603/604 [00:20<00:00, 30.07it/s, now=None]",
"output": "https://replicate.delivery/xezq/Temtj9qsIWznMaKRH2ZwsHuGgagLVB7T0f9deLLqvaAddvMqA/tom-cruise.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-07-31T19:49:01.726Z",
"started_at": "2025-07-31T19:49:10.146258Z",
"completed_at": "2025-07-31T19:53:18.568907Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/m4ch01f6ksrmc0crc83s83zjbw/cancel",
"children": "https://api.replicate.com/v1/predictions/m4ch01f6ksrmc0crc83s83zjbw/children",
"get": "https://api.replicate.com/v1/predictions/m4ch01f6ksrmc0crc83s83zjbw",
"root": "https://api.replicate.com/v1/predictions/m4ch01f6ksrmc0crc83s83zjbw",
"stream": "https://stream.replicate.com/v1/files/bcwr-56ye663dnugm67jn7kfkkwwsqwcv6q67ww6j5mvm4adsm5k2u27q",
"web": "https://replicate.com/p/m4ch01f6ksrmc0crc83s83zjbw"
},
"metrics": {
"predict_time": 248.422648486,
"total_time": 256.842907
}
}