typefile
{
"character_1_image": "https://api.replicate.com/v1/files/OGE4N2QzN2ItYjVkMS00ZGIyLTg4ZTktNTQyZWU2Y2I4ZGU4",
"character_1_name": "Dumbledore",
"character_2_audio": "https://api.replicate.com/v1/files/MjEyMDk3MTYtZjhmMC00ZWZmLTg0MGQtNjRkMjdiODQxNzQ4",
"character_2_image": "https://api.replicate.com/v1/files/ZDcyOWZhZjUtYjMxOS00YTc1LTk3ZjgtYjRlNmI5ZmRlYTBj",
"character_2_name": "Harry Potter",
"character_3_image": "https://api.replicate.com/v1/files/NjVmM2E1NWMtYmY4OS00NWM0LWFmYzctNzliNDgwZDVmNmIz",
"character_3_name": "Ron Weasley",
"character_4_audio": "https://api.replicate.com/v1/files/YWRmMDNhMWQtNDIyOC00MjllLWJjYzEtZjI4ZjE4YmYwMDNm",
"character_4_image": "https://api.replicate.com/v1/files/YmIyN2NiNmItZjA1YS00NWIxLTlmMjYtY2FmOGU4MzEzYWEy",
"character_4_name": "Hermione Granger",
"character_5_image": "https://api.replicate.com/v1/files/ODZkZmQxMzEtY2RhNy00ZGUyLTgzNDYtNjBhZjc0YzVkZjE3",
"character_5_name": "Hagrid"
}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/balenciaga using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
character_1_image: "https://api.replicate.com/v1/files/OGE4N2QzN2ItYjVkMS00ZGIyLTg4ZTktNTQyZWU2Y2I4ZGU4",
character_1_name: "Dumbledore",
character_2_audio: "https://api.replicate.com/v1/files/MjEyMDk3MTYtZjhmMC00ZWZmLTg0MGQtNjRkMjdiODQxNzQ4",
character_2_image: "https://api.replicate.com/v1/files/ZDcyOWZhZjUtYjMxOS00YTc1LTk3ZjgtYjRlNmI5ZmRlYTBj",
character_2_name: "Harry Potter",
character_3_image: "https://api.replicate.com/v1/files/NjVmM2E1NWMtYmY4OS00NWM0LWFmYzctNzliNDgwZDVmNmIz",
character_3_name: "Ron Weasley",
character_4_audio: "https://api.replicate.com/v1/files/YWRmMDNhMWQtNDIyOC00MjllLWJjYzEtZjI4ZjE4YmYwMDNm",
character_4_image: "https://api.replicate.com/v1/files/YmIyN2NiNmItZjA1YS00NWIxLTlmMjYtY2FmOGU4MzEzYWEy",
character_4_name: "Hermione Granger",
character_5_image: "https://api.replicate.com/v1/files/ODZkZmQxMzEtY2RhNy00ZGUyLTgzNDYtNjBhZjc0YzVkZjE3",
character_5_name: "Hagrid"
};
const output = await replicate.run("8w9ag/balenciaga", { 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/balenciaga using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"8w9ag/balenciaga",
input={
"character_1_image": "https://api.replicate.com/v1/files/OGE4N2QzN2ItYjVkMS00ZGIyLTg4ZTktNTQyZWU2Y2I4ZGU4",
"character_1_name": "Dumbledore",
"character_2_audio": "https://api.replicate.com/v1/files/MjEyMDk3MTYtZjhmMC00ZWZmLTg0MGQtNjRkMjdiODQxNzQ4",
"character_2_image": "https://api.replicate.com/v1/files/ZDcyOWZhZjUtYjMxOS00YTc1LTk3ZjgtYjRlNmI5ZmRlYTBj",
"character_2_name": "Harry Potter",
"character_3_image": "https://api.replicate.com/v1/files/NjVmM2E1NWMtYmY4OS00NWM0LWFmYzctNzliNDgwZDVmNmIz",
"character_3_name": "Ron Weasley",
"character_4_audio": "https://api.replicate.com/v1/files/YWRmMDNhMWQtNDIyOC00MjllLWJjYzEtZjI4ZjE4YmYwMDNm",
"character_4_image": "https://api.replicate.com/v1/files/YmIyN2NiNmItZjA1YS00NWIxLTlmMjYtY2FmOGU4MzEzYWEy",
"character_4_name": "Hermione Granger",
"character_5_image": "https://api.replicate.com/v1/files/ODZkZmQxMzEtY2RhNy00ZGUyLTgzNDYtNjBhZjc0YzVkZjE3",
"character_5_name": "Hagrid"
}
)
# 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/balenciaga 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": {
"character_1_image": "https://api.replicate.com/v1/files/OGE4N2QzN2ItYjVkMS00ZGIyLTg4ZTktNTQyZWU2Y2I4ZGU4",
"character_1_name": "Dumbledore",
"character_2_audio": "https://api.replicate.com/v1/files/MjEyMDk3MTYtZjhmMC00ZWZmLTg0MGQtNjRkMjdiODQxNzQ4",
"character_2_image": "https://api.replicate.com/v1/files/ZDcyOWZhZjUtYjMxOS00YTc1LTk3ZjgtYjRlNmI5ZmRlYTBj",
"character_2_name": "Harry Potter",
"character_3_image": "https://api.replicate.com/v1/files/NjVmM2E1NWMtYmY4OS00NWM0LWFmYzctNzliNDgwZDVmNmIz",
"character_3_name": "Ron Weasley",
"character_4_audio": "https://api.replicate.com/v1/files/YWRmMDNhMWQtNDIyOC00MjllLWJjYzEtZjI4ZjE4YmYwMDNm",
"character_4_image": "https://api.replicate.com/v1/files/YmIyN2NiNmItZjA1YS00NWIxLTlmMjYtY2FmOGU4MzEzYWEy",
"character_4_name": "Hermione Granger",
"character_5_image": "https://api.replicate.com/v1/files/ODZkZmQxMzEtY2RhNy00ZGUyLTgzNDYtNjBhZjc0YzVkZjE3",
"character_5_name": "Hagrid"
}
}' \
https://api.replicate.com/v1/models/8w9ag/balenciaga/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "g9ns42d6rxrma0cr7smskk09k8",
"model": "8w9ag/balenciaga",
"version": "hidden",
"input": {
"character_1_image": "https://api.replicate.com/v1/files/OGE4N2QzN2ItYjVkMS00ZGIyLTg4ZTktNTQyZWU2Y2I4ZGU4",
"character_1_name": "Dumbledore",
"character_2_audio": "https://api.replicate.com/v1/files/MjEyMDk3MTYtZjhmMC00ZWZmLTg0MGQtNjRkMjdiODQxNzQ4",
"character_2_image": "https://api.replicate.com/v1/files/ZDcyOWZhZjUtYjMxOS00YTc1LTk3ZjgtYjRlNmI5ZmRlYTBj",
"character_2_name": "Harry Potter",
"character_3_image": "https://api.replicate.com/v1/files/NjVmM2E1NWMtYmY4OS00NWM0LWFmYzctNzliNDgwZDVmNmIz",
"character_3_name": "Ron Weasley",
"character_4_audio": "https://api.replicate.com/v1/files/YWRmMDNhMWQtNDIyOC00MjllLWJjYzEtZjI4ZjE4YmYwMDNm",
"character_4_image": "https://api.replicate.com/v1/files/YmIyN2NiNmItZjA1YS00NWIxLTlmMjYtY2FmOGU4MzEzYWEy",
"character_4_name": "Hermione Granger",
"character_5_image": "https://api.replicate.com/v1/files/ODZkZmQxMzEtY2RhNy00ZGUyLTgzNDYtNjBhZjc0YzVkZjE3",
"character_5_name": "Hagrid"
},
"logs": "Resizing image\nRendering audio for Harry Potter\nMoviePy - Writing audio in Harry Potter-catchphrase-full.wav\n\nchunk: 0%| | 0/125 [00:00<?, ?it/s, now=None]\n \nMoviePy - Done.\nResizing image\nResizing image\nRendering audio for Hermione Granger\nMoviePy - Writing audio in Hermione Granger-catchphrase-full.wav\n\nchunk: 0%| | 0/125 [00:00<?, ?it/s, now=None]\n \nMoviePy - Done.\nResizing image\nMoviePy - Building video balenciaga.mp4.\nMoviePy - Writing audio in balenciagaTEMP_MPY_wvf_snd.mp3\n\nchunk: 0%| | 0/599 [00:00<?, ?it/s, now=None]\nchunk: 23%|██▎ | 140/599 [00:00<00:00, 1363.63it/s, now=None]\nchunk: 46%|████▌ | 277/599 [00:00<00:00, 1059.99it/s, now=None]\nchunk: 65%|██████▍ | 387/599 [00:00<00:00, 1031.53it/s, now=None]\nchunk: 99%|█████████▉| 593/599 [00:00<00:00, 970.02it/s, now=None]\n \nMoviePy - Done.\nMoviePy - Writing video balenciaga.mp4\n\n\nframe_index: 0%| | 0/679 [00:00<?, ?it/s, now=None]\nframe_index: 1%|▏ | 9/679 [00:00<00:07, 87.91it/s, now=None]\nframe_index: 3%|▎ | 18/679 [00:00<00:07, 87.41it/s, now=None]\nframe_index: 4%|▍ | 27/679 [00:00<00:07, 86.58it/s, now=None]\nframe_index: 5%|▌ | 36/679 [00:00<00:07, 86.79it/s, now=None]\nframe_index: 7%|▋ | 45/679 [00:00<00:08, 78.67it/s, now=None]\nframe_index: 8%|▊ | 53/679 [00:00<00:08, 74.18it/s, now=None]\nframe_index: 9%|▉ | 61/679 [00:00<00:08, 72.36it/s, now=None]\nframe_index: 10%|█ | 69/679 [00:00<00:08, 70.75it/s, now=None]\nframe_index: 11%|█▏ | 77/679 [00:01<00:08, 70.06it/s, now=None]\nframe_index: 13%|█▎ | 85/679 [00:01<00:08, 69.40it/s, now=None]\nframe_index: 14%|█▎ | 92/679 [00:01<00:08, 68.59it/s, now=None]\nframe_index: 15%|█▍ | 100/679 [00:01<00:08, 68.62it/s, now=None]\nframe_index: 16%|█▌ | 108/679 [00:01<00:08, 69.32it/s, now=None]\nframe_index: 17%|█▋ | 116/679 [00:01<00:08, 70.37it/s, now=None]\nframe_index: 18%|█▊ | 124/679 [00:01<00:07, 72.12it/s, now=None]\nframe_index: 19%|█▉ | 132/679 [00:01<00:07, 73.91it/s, now=None]\nframe_index: 21%|██ | 140/679 [00:01<00:07, 75.37it/s, now=None]\nframe_index: 22%|██▏ | 148/679 [00:02<00:07, 70.89it/s, now=None]\nframe_index: 23%|██▎ | 156/679 [00:02<00:07, 67.70it/s, now=None]\nframe_index: 24%|██▍ | 163/679 [00:02<00:07, 67.10it/s, now=None]\nframe_index: 25%|██▌ | 170/679 [00:02<00:07, 65.54it/s, now=None]\nframe_index: 26%|██▌ | 177/679 [00:02<00:07, 64.54it/s, now=None]\nframe_index: 27%|██▋ | 184/679 [00:02<00:07, 62.40it/s, now=None]\nframe_index: 28%|██▊ | 191/679 [00:02<00:08, 60.86it/s, now=None]\nframe_index: 29%|██▉ | 198/679 [00:02<00:08, 59.04it/s, now=None]\nframe_index: 30%|███ | 204/679 [00:02<00:08, 58.03it/s, now=None]\nframe_index: 31%|███ | 210/679 [00:03<00:08, 56.65it/s, now=None]\nframe_index: 32%|███▏ | 216/679 [00:03<00:08, 56.80it/s, now=None]\nframe_index: 33%|███▎ | 222/679 [00:03<00:08, 56.05it/s, now=None]\nframe_index: 34%|███▎ | 228/679 [00:03<00:08, 56.27it/s, now=None]\nframe_index: 34%|███▍ | 234/679 [00:03<00:08, 54.85it/s, now=None]\nframe_index: 35%|███▌ | 240/679 [00:03<00:07, 56.20it/s, now=None]\nframe_index: 36%|███▌ | 246/679 [00:03<00:07, 57.24it/s, now=None]\nframe_index: 37%|███▋ | 253/679 [00:03<00:07, 58.51it/s, now=None]\nframe_index: 38%|███▊ | 260/679 [00:03<00:06, 59.86it/s, now=None]\nframe_index: 39%|███▉ | 267/679 [00:04<00:06, 60.75it/s, now=None]\nframe_index: 40%|████ | 274/679 [00:04<00:06, 60.30it/s, now=None]\nframe_index: 41%|████▏ | 281/679 [00:04<00:06, 60.70it/s, now=None]\nframe_index: 42%|████▏ | 288/679 [00:04<00:06, 61.68it/s, now=None]\nframe_index: 43%|████▎ | 295/679 [00:04<00:06, 61.36it/s, now=None]\nframe_index: 44%|████▍ | 302/679 [00:04<00:06, 61.48it/s, now=None]\nframe_index: 46%|████▌ | 309/679 [00:04<00:05, 62.76it/s, now=None]\nframe_index: 47%|████▋ | 316/679 [00:04<00:05, 62.21it/s, now=None]\nframe_index: 48%|████▊ | 323/679 [00:04<00:05, 61.72it/s, now=None]\nframe_index: 49%|████▊ | 330/679 [00:05<00:05, 62.30it/s, now=None]\nframe_index: 50%|████▉ | 337/679 [00:05<00:05, 62.67it/s, now=None]\nframe_index: 51%|█████ | 344/679 [00:05<00:05, 64.06it/s, now=None]\nframe_index: 52%|█████▏ | 351/679 [00:05<00:05, 64.26it/s, now=None]\nframe_index: 53%|█████▎ | 358/679 [00:05<00:04, 64.68it/s, now=None]\nframe_index: 54%|█████▍ | 365/679 [00:05<00:04, 65.12it/s, now=None]\nframe_index: 55%|█████▍ | 372/679 [00:05<00:04, 65.51it/s, now=None]\nframe_index: 56%|█████▌ | 379/679 [00:05<00:04, 65.91it/s, now=None]\nframe_index: 57%|█████▋ | 386/679 [00:05<00:04, 66.00it/s, now=None]\nframe_index: 58%|█████▊ | 394/679 [00:06<00:04, 68.22it/s, now=None]\nframe_index: 59%|█████▉ | 402/679 [00:06<00:03, 69.86it/s, now=None]\nframe_index: 60%|██████ | 410/679 [00:06<00:03, 71.91it/s, now=None]\nframe_index: 62%|██████▏ | 418/679 [00:06<00:03, 70.02it/s, now=None]\nframe_index: 63%|██████▎ | 426/679 [00:06<00:03, 68.94it/s, now=None]\nframe_index: 64%|██████▍ | 433/679 [00:06<00:03, 67.72it/s, now=None]\nframe_index: 65%|██████▍ | 441/679 [00:06<00:03, 67.81it/s, now=None]\nframe_index: 66%|██████▌ | 448/679 [00:06<00:03, 68.32it/s, now=None]\nframe_index: 67%|██████▋ | 455/679 [00:06<00:03, 64.63it/s, now=None]\nframe_index: 68%|██████▊ | 462/679 [00:07<00:03, 63.70it/s, now=None]\nframe_index: 69%|██████▉ | 469/679 [00:07<00:03, 64.35it/s, now=None]\nframe_index: 70%|███████ | 476/679 [00:07<00:03, 63.36it/s, now=None]\nframe_index: 71%|███████ | 483/679 [00:07<00:03, 63.24it/s, now=None]\nframe_index: 72%|███████▏ | 490/679 [00:07<00:02, 63.18it/s, now=None]\nframe_index: 73%|███████▎ | 497/679 [00:07<00:02, 64.29it/s, now=None]\nframe_index: 74%|███████▍ | 504/679 [00:07<00:02, 63.53it/s, now=None]\nframe_index: 75%|███████▌ | 511/679 [00:07<00:02, 64.00it/s, now=None]\nframe_index: 76%|███████▋ | 518/679 [00:07<00:02, 64.86it/s, now=None]\nframe_index: 77%|███████▋ | 526/679 [00:08<00:02, 66.87it/s, now=None]\nframe_index: 79%|███████▊ | 534/679 [00:08<00:02, 68.45it/s, now=None]\nframe_index: 80%|███████▉ | 542/679 [00:08<00:01, 68.94it/s, now=None]\nframe_index: 81%|████████ | 549/679 [00:08<00:01, 69.09it/s, now=None]\nframe_index: 82%|████████▏ | 556/679 [00:08<00:01, 68.17it/s, now=None]\nframe_index: 83%|████████▎ | 563/679 [00:08<00:01, 67.73it/s, now=None]\nframe_index: 84%|████████▍ | 570/679 [00:08<00:01, 67.51it/s, now=None]\nframe_index: 85%|████████▍ | 577/679 [00:08<00:01, 67.99it/s, now=None]\nframe_index: 86%|████████▌ | 584/679 [00:08<00:01, 64.92it/s, now=None]\nframe_index: 87%|████████▋ | 591/679 [00:09<00:01, 63.57it/s, now=None]\nframe_index: 88%|████████▊ | 598/679 [00:09<00:01, 63.94it/s, now=None]\nframe_index: 89%|████████▉ | 605/679 [00:09<00:01, 65.17it/s, now=None]\nframe_index: 90%|█████████ | 612/679 [00:09<00:01, 65.13it/s, now=None]\nframe_index: 91%|█████████ | 619/679 [00:09<00:00, 65.02it/s, now=None]\nframe_index: 92%|█████████▏| 626/679 [00:09<00:00, 65.30it/s, now=None]\nframe_index: 93%|█████████▎| 633/679 [00:09<00:00, 66.44it/s, now=None]\nframe_index: 94%|█████████▍| 640/679 [00:09<00:00, 65.80it/s, now=None]\nframe_index: 95%|█████████▌| 647/679 [00:09<00:00, 65.51it/s, now=None]\nframe_index: 96%|█████████▋| 654/679 [00:09<00:00, 66.04it/s, now=None]\nframe_index: 97%|█████████▋| 662/679 [00:10<00:00, 68.05it/s, now=None]\nframe_index: 99%|█████████▊| 670/679 [00:10<00:00, 69.78it/s, now=None]\nframe_index: 100%|█████████▉| 678/679 [00:10<00:00, 71.73it/s, now=None]",
"output": "https://replicate.delivery/xezq/jlqEJXragnaSN1cuNdNflDYJ0CZN3K850fIXev6HDmAheXQUB/balenciaga.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-07-24T21:49:28.135Z",
"started_at": "2025-07-24T21:49:30.960028Z",
"completed_at": "2025-07-24T22:04:01.037906Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/g9ns42d6rxrma0cr7smskk09k8/cancel",
"children": "https://api.replicate.com/v1/predictions/g9ns42d6rxrma0cr7smskk09k8/children",
"get": "https://api.replicate.com/v1/predictions/g9ns42d6rxrma0cr7smskk09k8",
"root": "https://api.replicate.com/v1/predictions/g9ns42d6rxrma0cr7smskk09k8",
"stream": "https://stream.replicate.com/v1/files/bcwr-idu4yat2kqselhhy7cmure5xb6a6xhv27p3wneydhkhtv6b5dibq",
"web": "https://replicate.com/p/g9ns42d6rxrma0cr7smskk09k8"
},
"metrics": {
"predict_time": 870.07787827,
"total_time": 872.902906
}
}