typefile
{
"audio": "https://replicate.delivery/pbxt/NWYEr8QPkBeQZaJ2GkPlU1z1B7CWQJtyUJRoUnpwlluZaZ6g/replicate-prediction-gz0dq0zj71rma0crky99mj4q0r.mp3",
"captions": true,
"duration": 10,
"image": "https://replicate.delivery/pbxt/NZOWZquQIRTicbBpH4PAUBAasf0ca0tVdp25TF7riFBUayUw/GyqIvuYW8AsNRiW.jpg",
"resolution": "720p"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_01S**********************************
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 pipeline-examples/talking-avatar using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
audio: "https://replicate.delivery/pbxt/NWYEr8QPkBeQZaJ2GkPlU1z1B7CWQJtyUJRoUnpwlluZaZ6g/replicate-prediction-gz0dq0zj71rma0crky99mj4q0r.mp3",
captions: true,
duration: 10,
image: "https://replicate.delivery/pbxt/NZOWZquQIRTicbBpH4PAUBAasf0ca0tVdp25TF7riFBUayUw/GyqIvuYW8AsNRiW.jpg",
resolution: "720p"
};
const output = await replicate.run("pipeline-examples/talking-avatar", { 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_01S**********************************
This is your API token. Keep it to yourself.
import replicate
Run pipeline-examples/talking-avatar using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pipeline-examples/talking-avatar",
input={
"audio": "https://replicate.delivery/pbxt/NWYEr8QPkBeQZaJ2GkPlU1z1B7CWQJtyUJRoUnpwlluZaZ6g/replicate-prediction-gz0dq0zj71rma0crky99mj4q0r.mp3",
"captions": True,
"duration": 10,
"image": "https://replicate.delivery/pbxt/NZOWZquQIRTicbBpH4PAUBAasf0ca0tVdp25TF7riFBUayUw/GyqIvuYW8AsNRiW.jpg",
"resolution": "720p"
}
)
# 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_01S**********************************
This is your API token. Keep it to yourself.
Run pipeline-examples/talking-avatar 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": {
"audio": "https://replicate.delivery/pbxt/NWYEr8QPkBeQZaJ2GkPlU1z1B7CWQJtyUJRoUnpwlluZaZ6g/replicate-prediction-gz0dq0zj71rma0crky99mj4q0r.mp3",
"captions": true,
"duration": 10,
"image": "https://replicate.delivery/pbxt/NZOWZquQIRTicbBpH4PAUBAasf0ca0tVdp25TF7riFBUayUw/GyqIvuYW8AsNRiW.jpg",
"resolution": "720p"
}
}' \
https://api.replicate.com/v1/models/pipeline-examples/talking-avatar/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "h4vn0wj6r1rme0crs3y8b9tkwm",
"model": "pipeline-examples/talking-avatar",
"version": "hidden",
"input": {
"audio": "https://replicate.delivery/pbxt/NWYEr8QPkBeQZaJ2GkPlU1z1B7CWQJtyUJRoUnpwlluZaZ6g/replicate-prediction-gz0dq0zj71rma0crky99mj4q0r.mp3",
"captions": true,
"duration": 10,
"image": "https://replicate.delivery/pbxt/NZOWZquQIRTicbBpH4PAUBAasf0ca0tVdp25TF7riFBUayUw/GyqIvuYW8AsNRiW.jpg",
"resolution": "720p"
},
"logs": "Generating video from image...\nAdding lip synchronization...\nAdding captions...",
"output": "https://replicate.delivery/xezq/RumsBSJxO8JxIhihtqTxe6PvRcf1DhiUm9WOP4Le54S176ZqA/output.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-20T19:37:13.152Z",
"started_at": "2025-08-20T19:37:13.659919Z",
"completed_at": "2025-08-20T19:43:54.728264Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/h4vn0wj6r1rme0crs3y8b9tkwm/cancel",
"children": "https://api.replicate.com/v1/predictions/h4vn0wj6r1rme0crs3y8b9tkwm/children",
"get": "https://api.replicate.com/v1/predictions/h4vn0wj6r1rme0crs3y8b9tkwm",
"root": "https://api.replicate.com/v1/predictions/h4vn0wj6r1rme0crs3y8b9tkwm",
"stream": "https://stream.replicate.com/v1/files/bcwr-fz44w3bsqioeoeaey7ypd6pfq7zdd24jmmgofv3o5ok5q5zzr6dq",
"web": "https://replicate.com/p/h4vn0wj6r1rme0crs3y8b9tkwm"
},
"metrics": {
"predict_time": 401.068344585,
"total_time": 401.576264
}
}