typetext
{
"text": "\"one simply use Replicate\""
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_MGS**********************************
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/meme using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
text: "\"one simply use Replicate\""
};
const output = await replicate.run("pipeline-examples/meme", { 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_MGS**********************************
This is your API token. Keep it to yourself.
import replicate
Run pipeline-examples/meme using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pipeline-examples/meme",
input={
"text": "\"one simply use Replicate\""
}
)
# 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_MGS**********************************
This is your API token. Keep it to yourself.
Run pipeline-examples/meme 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": {
"text": "\\"one simply use Replicate\\""
}
}' \
https://api.replicate.com/v1/models/pipeline-examples/meme/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "yy22nqdrpdrm80crq6787fmkz4",
"model": "pipeline-examples/meme",
"version": "hidden",
"input": {
"text": "\"one simply use Replicate\""
},
"logs": "",
"output": "https://replicate.delivery/xezq/C1zD2Hi2eTRWdirIfQT9yIiWsvegASTxfq2EiFcfwMei2iflKA/tmptg89oo0s.webp",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-17T19:43:15.123Z",
"started_at": "2025-08-17T19:43:15.419871Z",
"completed_at": "2025-08-17T19:43:22.605807Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/yy22nqdrpdrm80crq6787fmkz4/cancel",
"children": "https://api.replicate.com/v1/predictions/yy22nqdrpdrm80crq6787fmkz4/children",
"get": "https://api.replicate.com/v1/predictions/yy22nqdrpdrm80crq6787fmkz4",
"root": "https://api.replicate.com/v1/predictions/yy22nqdrpdrm80crq6787fmkz4",
"stream": "https://stream.replicate.com/v1/files/bcwr-mt33arukw4rnr2j6sqnonnjvznvfvq7ufocw6bvtxcobfb4dpxeq",
"web": "https://replicate.com/p/yy22nqdrpdrm80crq6787fmkz4"
},
"metrics": {
"predict_time": 7.185936203,
"total_time": 7.482807
}
}