typetext
{
"aspect_ratio": "4:3",
"font_style": "corporate_futura",
"output_format": "jpg",
"safety_filter_level": "block_only_high",
"setting": "san francisco ferry terminal",
"text": "tech companies are not poets"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_EBC**********************************
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 corywilkerson/redbook using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "4:3",
font_style: "corporate_futura",
output_format: "jpg",
safety_filter_level: "block_only_high",
setting: "san francisco ferry terminal",
text: "tech companies are not poets"
};
const output = await replicate.run("corywilkerson/redbook", { 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_EBC**********************************
This is your API token. Keep it to yourself.
import replicate
Run corywilkerson/redbook using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"corywilkerson/redbook",
input={
"aspect_ratio": "4:3",
"font_style": "corporate_futura",
"output_format": "jpg",
"safety_filter_level": "block_only_high",
"setting": "san francisco ferry terminal",
"text": "tech companies are not poets"
}
)
# 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_EBC**********************************
This is your API token. Keep it to yourself.
Run corywilkerson/redbook 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": {
"aspect_ratio": "4:3",
"font_style": "corporate_futura",
"output_format": "jpg",
"safety_filter_level": "block_only_high",
"setting": "san francisco ferry terminal",
"text": "tech companies are not poets"
}
}' \
https://api.replicate.com/v1/models/corywilkerson/redbook/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "jag8aydqm1rmc0crqsjrbk6r44",
"model": "corywilkerson/redbook",
"version": "hidden",
"input": {
"aspect_ratio": "4:3",
"font_style": "corporate_futura",
"output_format": "jpg",
"safety_filter_level": "block_only_high",
"setting": "san francisco ferry terminal",
"text": "tech companies are not poets"
},
"logs": "",
"output": "https://replicate.delivery/xezq/0cmSaZau7nIMDJXz2FNp2dwuO1k6rLUoIdhTaxKe3FELAJmKA/tmpdxx2rzrt.jpg",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-18T18:16:33.952Z",
"started_at": "2025-08-18T18:16:34.287709Z",
"completed_at": "2025-08-18T18:16:54.210396Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/jag8aydqm1rmc0crqsjrbk6r44/cancel",
"children": "https://api.replicate.com/v1/predictions/jag8aydqm1rmc0crqsjrbk6r44/children",
"get": "https://api.replicate.com/v1/predictions/jag8aydqm1rmc0crqsjrbk6r44",
"root": "https://api.replicate.com/v1/predictions/jag8aydqm1rmc0crqsjrbk6r44",
"stream": "https://stream.replicate.com/v1/files/bcwr-xt4fsmdaiwt5jrmjw7n5y3r7sp7sidmng2kfejh35esvau72k6aq",
"web": "https://replicate.com/p/jag8aydqm1rmc0crqsjrbk6r44"
},
"metrics": {
"predict_time": 19.922687528,
"total_time": 20.258396
}
}