typefile
{
"image_duration": 0.2,
"initial_image": "https://api.replicate.com/v1/files/Yjg3YjY4NmQtMDIzMC00ZjJjLTllN2QtZjExMWJhMjdlNzcy"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_GvU**********************************
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/papercopy using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
image_duration: 0.2,
initial_image: "https://api.replicate.com/v1/files/Yjg3YjY4NmQtMDIzMC00ZjJjLTllN2QtZjExMWJhMjdlNzcy"
};
const output = await replicate.run("8w9ag/papercopy", { 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_GvU**********************************
This is your API token. Keep it to yourself.
import replicate
Run 8w9ag/papercopy using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"8w9ag/papercopy",
input={
"image_duration": 0.2,
"initial_image": "https://api.replicate.com/v1/files/Yjg3YjY4NmQtMDIzMC00ZjJjLTllN2QtZjExMWJhMjdlNzcy"
}
)
# 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_GvU**********************************
This is your API token. Keep it to yourself.
Run 8w9ag/papercopy 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": {
"image_duration": 0.2,
"initial_image": "https://api.replicate.com/v1/files/Yjg3YjY4NmQtMDIzMC00ZjJjLTllN2QtZjExMWJhMjdlNzcy"
}
}' \
https://api.replicate.com/v1/models/8w9ag/papercopy/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "6327qbrdqxrmc0cr87qsgkywmw",
"model": "8w9ag/papercopy",
"version": "hidden",
"input": {
"image_duration": 0.2,
"initial_image": "https://api.replicate.com/v1/files/Yjg3YjY4NmQtMDIzMC00ZjJjLTllN2QtZjExMWJhMjdlNzcy"
},
"logs": "MoviePy - Building video papercopy.mp4.\nMoviePy - Writing video papercopy.mp4\n\n\nframe_index: 0%| | 0/153 [00:00<?, ?it/s, now=None]\nframe_index: 14%|█▍ | 22/153 [00:00<00:00, 219.46it/s, now=None]\nframe_index: 29%|██▉ | 44/153 [00:00<00:00, 212.69it/s, now=None]\nframe_index: 43%|████▎ | 66/153 [00:00<00:00, 176.42it/s, now=None]\nframe_index: 64%|██████▍ | 98/153 [00:01<00:01, 50.15it/s, now=None]\nframe_index: 70%|██████▉ | 107/153 [00:01<00:01, 41.25it/s, now=None]\nframe_index: 75%|███████▍ | 114/153 [00:01<00:00, 40.35it/s, now=None]\nframe_index: 78%|███████▊ | 120/153 [00:02<00:00, 39.51it/s, now=None]\nframe_index: 82%|████████▏ | 126/153 [00:02<00:00, 38.59it/s, now=None]\nframe_index: 86%|████████▌ | 131/153 [00:02<00:00, 35.83it/s, now=None]\nframe_index: 89%|████████▉ | 136/153 [00:02<00:00, 34.46it/s, now=None]\nframe_index: 92%|█████████▏| 141/153 [00:02<00:00, 35.96it/s, now=None]\nframe_index: 95%|█████████▍| 145/153 [00:02<00:00, 32.43it/s, now=None]\nframe_index: 99%|█████████▊| 151/153 [00:03<00:00, 37.15it/s, now=None]",
"output": "https://replicate.delivery/xezq/8kkSgAyGB9JjKpwIg825RGhM1jh4fDepMl7QM7yyxLEuOUEVA/papercopy.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-07-25T14:14:02.431Z",
"started_at": "2025-07-25T14:14:05.321283Z",
"completed_at": "2025-07-25T14:16:14.319131Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/6327qbrdqxrmc0cr87qsgkywmw/cancel",
"children": "https://api.replicate.com/v1/predictions/6327qbrdqxrmc0cr87qsgkywmw/children",
"get": "https://api.replicate.com/v1/predictions/6327qbrdqxrmc0cr87qsgkywmw",
"root": "https://api.replicate.com/v1/predictions/6327qbrdqxrmc0cr87qsgkywmw",
"stream": "https://stream.replicate.com/v1/files/bcwr-emznyjjypdk4j7vk3f7a2vj4na5pj6ewhucmslw6g3kv4opncqea",
"web": "https://replicate.com/p/6327qbrdqxrmc0cr87qsgkywmw"
},
"metrics": {
"predict_time": 128.99784785,
"total_time": 131.888131
}
}