typearray
value typefile
{
"videos": [
"https://replicate.delivery/pbxt/Nba22rDZWGX56juR8LdLQFnXxJOx00YYbRhw9fHRZEbg8dlP/dp1ap1qyz1rma0crx2k9yxrq7g.mp4",
"https://replicate.delivery/pbxt/Nba23Wqik9D5rzcmMQyNEsgMozFRFpf45GP0nEvpgKHf8UOC/hs8d6afx2drma0crx2k8m455p4.mp4",
"https://replicate.delivery/pbxt/Nba22x5TYSKb6Wok4h56Qx5IDtueQu5CzcCYjmLU5B8LD94G/xgahcp7y39rme0crx2ka67tmcw.mp4",
"https://replicate.delivery/pbxt/Nba22oyukIoF1gXYoBGh9w4tD3vIXd6QOfN9aHEgPm8ZC172/6y06fnqzddrmc0crx2kb68em5c.mp4"
]
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_7Uj**********************************
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 zeke/pingpong-video-chain using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
videos: ["https://replicate.delivery/pbxt/Nba22rDZWGX56juR8LdLQFnXxJOx00YYbRhw9fHRZEbg8dlP/dp1ap1qyz1rma0crx2k9yxrq7g.mp4","https://replicate.delivery/pbxt/Nba23Wqik9D5rzcmMQyNEsgMozFRFpf45GP0nEvpgKHf8UOC/hs8d6afx2drma0crx2k8m455p4.mp4","https://replicate.delivery/pbxt/Nba22x5TYSKb6Wok4h56Qx5IDtueQu5CzcCYjmLU5B8LD94G/xgahcp7y39rme0crx2ka67tmcw.mp4","https://replicate.delivery/pbxt/Nba22oyukIoF1gXYoBGh9w4tD3vIXd6QOfN9aHEgPm8ZC172/6y06fnqzddrmc0crx2kb68em5c.mp4"]
};
const output = await replicate.run("zeke/pingpong-video-chain", { 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_7Uj**********************************
This is your API token. Keep it to yourself.
import replicate
Run zeke/pingpong-video-chain using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zeke/pingpong-video-chain",
input={
"videos": ["https://replicate.delivery/pbxt/Nba22rDZWGX56juR8LdLQFnXxJOx00YYbRhw9fHRZEbg8dlP/dp1ap1qyz1rma0crx2k9yxrq7g.mp4","https://replicate.delivery/pbxt/Nba23Wqik9D5rzcmMQyNEsgMozFRFpf45GP0nEvpgKHf8UOC/hs8d6afx2drma0crx2k8m455p4.mp4","https://replicate.delivery/pbxt/Nba22x5TYSKb6Wok4h56Qx5IDtueQu5CzcCYjmLU5B8LD94G/xgahcp7y39rme0crx2ka67tmcw.mp4","https://replicate.delivery/pbxt/Nba22oyukIoF1gXYoBGh9w4tD3vIXd6QOfN9aHEgPm8ZC172/6y06fnqzddrmc0crx2kb68em5c.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_7Uj**********************************
This is your API token. Keep it to yourself.
Run zeke/pingpong-video-chain 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": {
"videos": ["https://replicate.delivery/pbxt/Nba22rDZWGX56juR8LdLQFnXxJOx00YYbRhw9fHRZEbg8dlP/dp1ap1qyz1rma0crx2k9yxrq7g.mp4","https://replicate.delivery/pbxt/Nba23Wqik9D5rzcmMQyNEsgMozFRFpf45GP0nEvpgKHf8UOC/hs8d6afx2drma0crx2k8m455p4.mp4","https://replicate.delivery/pbxt/Nba22x5TYSKb6Wok4h56Qx5IDtueQu5CzcCYjmLU5B8LD94G/xgahcp7y39rme0crx2ka67tmcw.mp4","https://replicate.delivery/pbxt/Nba22oyukIoF1gXYoBGh9w4tD3vIXd6QOfN9aHEgPm8ZC172/6y06fnqzddrmc0crx2kb68em5c.mp4"]
}
}' \
https://api.replicate.com/v1/models/zeke/pingpong-video-chain/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "8qvsmcfjf5rme0crx2rrmnqram",
"model": "zeke/pingpong-video-chain",
"version": "hidden",
"input": {
"videos": [
"https://replicate.delivery/pbxt/Nba22rDZWGX56juR8LdLQFnXxJOx00YYbRhw9fHRZEbg8dlP/dp1ap1qyz1rma0crx2k9yxrq7g.mp4",
"https://replicate.delivery/pbxt/Nba23Wqik9D5rzcmMQyNEsgMozFRFpf45GP0nEvpgKHf8UOC/hs8d6afx2drma0crx2k8m455p4.mp4",
"https://replicate.delivery/pbxt/Nba22x5TYSKb6Wok4h56Qx5IDtueQu5CzcCYjmLU5B8LD94G/xgahcp7y39rme0crx2ka67tmcw.mp4",
"https://replicate.delivery/pbxt/Nba22oyukIoF1gXYoBGh9w4tD3vIXd6QOfN9aHEgPm8ZC172/6y06fnqzddrmc0crx2kb68em5c.mp4"
]
},
"logs": "ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers\n built with gcc 13.2.1 (Alpine 13.2.1_git20240309) 20240309\n configuration: --pkg-config-flags=--static --extra-cflags=-fopenmp --extra-ldflags='-fopenmp -Wl,--allow-multiple-definition -Wl,-z,stack-size=2097152' --toolchain=hardened --disable-debug --disable-shared --disable-ffplay --enable-static --enable-gpl --enable-version3 --enable-fontconfig --enable-gray --enable-iconv --enable-lcms2 --enable-libaom --enable-libaribb24 --enable-libass --enable-libbluray --enable-libdav1d --enable-libdavs2 --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libjxl --enable-libkvazaar --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librabbitmq --enable-librav1e --enable-librsvg --enable-librtmp --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxevd --enable-libxeve --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-openssl\n libavutil 59. 39.100 / 59. 39.100\n libavcodec 61. 19.101 / 61. 19.101\n libavformat 61. 7.100 / 61. 7.100\n libavdevice 61. 3.100 / 61. 3.100\n libavfilter 10. 4.100 / 10. 4.100\n libswscale 8. 3.100 / 8. 3.100\n libswresample 5. 3.100 / 5. 3.100\n libpostproc 58. 3.100 / 58. 3.100\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0x769c5c991d80] Auto-inserting h264_mp4toannexb bitstream filter\nInput #0, concat, from '/tmp/cog-runner-tmp-1223337050/tmp68u1pun1/filelist.txt':\n Duration: N/A, start: 0.000000, bitrate: 1420 kb/s\n Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 1420 kb/s, 24 fps, 24 tbr, 12288 tbn\n Metadata:\n handler_name : VideoHandler\n vendor_id : [0][0][0][0]\n encoder : Lavc61.19.101 libx264\nStream mapping:\n Stream #0:0 -> #0:0 (copy)\nOutput #0, mp4, to '/tmp/concatenated_pingpong_video.mp4':\n Metadata:\n encoder : Lavf61.7.100\n Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, q=2-31, 1420 kb/s, 24 fps, 24 tbr, 12288 tbn\n Metadata:\n handler_name : VideoHandler\n vendor_id : [0][0][0][0]\n encoder : Lavc61.19.101 libx264\nPress [q] to stop, [?] for help\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0x769c5c991d80] Auto-inserting h264_mp4toannexb bitstream filter\n Last message repeated 1 times\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0x769c5c97a840] Auto-inserting h264_mp4toannexb bitstream filter\n[out#0/mp4 @ 0x769c5c98e700] video:9755KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.180656%\nframe= 1536 fps=0.0 q=-1.0 Lsize= 9773KiB time=00:01:03.91 bitrate=1252.5kbits/s speed= 671x",
"output": "https://replicate.delivery/xezq/eJouo07ZEJydcCaWxeetzw8y80fwegiTzA6PQxdjzvRVD63pC/concatenated_pingpong_video.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-26T23:23:52.825Z",
"started_at": "2025-08-26T23:23:53.994841Z",
"completed_at": "2025-08-26T23:24:10.80323Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/8qvsmcfjf5rme0crx2rrmnqram/cancel",
"children": "https://api.replicate.com/v1/predictions/8qvsmcfjf5rme0crx2rrmnqram/children",
"get": "https://api.replicate.com/v1/predictions/8qvsmcfjf5rme0crx2rrmnqram",
"root": "https://api.replicate.com/v1/predictions/8qvsmcfjf5rme0crx2rrmnqram",
"stream": "https://stream.replicate.com/v1/files/bcwr-6jbygwq6ws46knbexksfembrjm5k7vmmkbqd3grobrio5cds34lq",
"web": "https://replicate.com/p/8qvsmcfjf5rme0crx2rrmnqram"
},
"metrics": {
"predict_time": 16.808389318,
"total_time": 17.97823
}
}