defaultAI
typetext
{
"duration": 60,
"time_frame": "past week",
"topic": "AI"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_8km**********************************
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 pipelines-beta/hn-podcast using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
duration: 60,
time_frame: "past week",
topic: "AI"
};
const output = await replicate.run("pipelines-beta/hn-podcast", { 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_8km**********************************
This is your API token. Keep it to yourself.
import replicate
Run pipelines-beta/hn-podcast using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pipelines-beta/hn-podcast",
input={
"duration": 60,
"time_frame": "past week",
"topic": "AI"
}
)
# 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_8km**********************************
This is your API token. Keep it to yourself.
Run pipelines-beta/hn-podcast 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": {
"duration": 60,
"time_frame": "past week",
"topic": "AI"
}
}' \
https://api.replicate.com/v1/models/pipelines-beta/hn-podcast/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "meqm4v9yehrme0cpmqcby6jdj4",
"model": "pipelines-beta/hn-podcast",
"version": "hidden",
"input": {
"duration": 60,
"time_frame": "past week",
"topic": "AI"
},
"logs": "",
"output": "https://replicate.delivery/xezq/FAwAjCpD0Fp4GVgMsefdQt6kHBs9na66T9qLmdaJp2bzU8pUA/output.mp3",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-05-06T13:45:34.58Z",
"started_at": "2025-05-06T13:45:55.574736Z",
"completed_at": "2025-05-06T13:48:35.830439Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/meqm4v9yehrme0cpmqcby6jdj4/cancel",
"children": "https://api.replicate.com/v1/predictions/meqm4v9yehrme0cpmqcby6jdj4/children",
"get": "https://api.replicate.com/v1/predictions/meqm4v9yehrme0cpmqcby6jdj4",
"root": "https://api.replicate.com/v1/predictions/meqm4v9yehrme0cpmqcby6jdj4",
"stream": "https://stream.replicate.com/v1/files/bcwr-xkipvop465p27zd4zwm5zfvxs5nggebgnnigzojndotejniolspq",
"web": "https://replicate.com/p/meqm4v9yehrme0cpmqcby6jdj4"
},
"metrics": {
"predict_time": 160.255703182,
"total_time": 181.250439
}
}