typetext
{
"audio_model": "kokoro",
"prompt": "Pineapples vs Bananas"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_ZpA**********************************
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/stapledon-podcast using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
audio_model: "kokoro",
prompt: "Pineapples vs Bananas"
};
const output = await replicate.run("pipeline-examples/stapledon-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_ZpA**********************************
This is your API token. Keep it to yourself.
import replicate
Run pipeline-examples/stapledon-podcast using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pipeline-examples/stapledon-podcast",
input={
"audio_model": "kokoro",
"prompt": "Pineapples vs Bananas"
}
)
# 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_ZpA**********************************
This is your API token. Keep it to yourself.
Run pipeline-examples/stapledon-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": {
"audio_model": "kokoro",
"prompt": "Pineapples vs Bananas"
}
}' \
https://api.replicate.com/v1/models/pipeline-examples/stapledon-podcast/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "9pxaptadrsrm80crq5vtww35ar",
"model": "pipeline-examples/stapledon-podcast",
"version": "hidden",
"input": {
"audio_model": "kokoro",
"prompt": "Pineapples vs Bananas"
},
"logs": "Ah, what a curious juxtaposition presents itself to the contemplating mind! Here we encounter two manifestations of terrestrial fructification, each embodying fundamentally distinct approaches to the ancient biological imperative of perpetuation and nourishment.\n\nConsider first the pineapple, that armored citadel of sweetness. Its form speaks of fortress-like determination - a compound fruit, built not from the flowering of a single blossom but from the coalescence of many individual flowers into one unified, bristling whole. Each hexagonal segment upon its surface bears witness to what was once a separate flower's ambition, now merged into a greater architectural marvel. The crown of leaves sprouting from its apex suggests a creature that has transcended its humble origins, wearing its foliage like a triumphant headdress. Its flesh, when breached, releases enzymes that actively digest protein - a fruit that feeds upon that which would feed upon it, embodying a kind of biochemical defiance.\n\nThe banana, by contrast, presents itself as the very embodiment of accessibility and gentle yielding. Its form follows the elegant mathematics of the curve, that fundamental principle which governs the spiral of galaxies and the nautilus shell alike. Wrapped in its easily-peeled golden vestment, it offers itself with minimal resistance to the hungry traveler. Yet this apparent simplicity conceals a profound biological paradox - for the banana as we know it exists in a state of genetic stasis, reproduced endlessly without the sexual congress of seed and soil, a kind of botanical monasticism.\n\nWhere the pineapple demands patience, tools, and considerable effort to unlock its treasures, the banana submits to the merest pressure of thumb and finger. Where one bristles with defensive spikes, the other curves in welcoming invitation. Yet both, in their distinct manners, represent successful strategies in the grand experiment of life's persistence through time and space.",
"output": "https://replicate.delivery/xezq/jShTkh6wDjqyD1hG1Jj6phats9jaCq1lnmfjy43SHo815eLVA/output.wav",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-17T19:17:40.422Z",
"started_at": "2025-08-17T19:17:40.767643Z",
"completed_at": "2025-08-17T19:18:03.414753Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/9pxaptadrsrm80crq5vtww35ar/cancel",
"children": "https://api.replicate.com/v1/predictions/9pxaptadrsrm80crq5vtww35ar/children",
"get": "https://api.replicate.com/v1/predictions/9pxaptadrsrm80crq5vtww35ar",
"root": "https://api.replicate.com/v1/predictions/9pxaptadrsrm80crq5vtww35ar",
"stream": "https://stream.replicate.com/v1/files/bcwr-2vn4tsiny435kdc5gye3ahf2bgrvl2h2qdxpmgiuqoe7ncr34srq",
"web": "https://replicate.com/p/9pxaptadrsrm80crq5vtww35ar"
},
"metrics": {
"predict_time": 22.647109668,
"total_time": 22.992753
}
}