{
"image": "https://replicate.delivery/pbxt/O3EyNFhlbJIkm1XIKm8uGgntp0cB2Nw3MRIcN7MRVcA6j0s1/me.png",
"prompt": "upside down"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_2T1**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run andreasjansson/text-to-imagemagick using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
image: "https://replicate.delivery/pbxt/O3EyNFhlbJIkm1XIKm8uGgntp0cB2Nw3MRIcN7MRVcA6j0s1/me.png",
prompt: "upside down"
};
const output = await replicate.run("andreasjansson/text-to-imagemagick", { input });
console.log(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_2T1**********************************
This is your API token. Keep it to yourself.
import replicate
Run andreasjansson/text-to-imagemagick using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"andreasjansson/text-to-imagemagick",
input={
"image": "https://replicate.delivery/pbxt/O3EyNFhlbJIkm1XIKm8uGgntp0cB2Nw3MRIcN7MRVcA6j0s1/me.png",
"prompt": "upside down"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_2T1**********************************
This is your API token. Keep it to yourself.
Run andreasjansson/text-to-imagemagick 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": {
"image": "https://replicate.delivery/pbxt/O3EyNFhlbJIkm1XIKm8uGgntp0cB2Nw3MRIcN7MRVcA6j0s1/me.png",
"prompt": "upside down"
}
}' \
https://api.replicate.com/v1/models/andreasjansson/text-to-imagemagick/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Object output with 2 properties
convert /tmp/input_image.png -resize 350x350! -flip /tmp/output.png
{
"id": "bcaaqsvh09rme0ctf80bjxkxn0",
"model": "andreasjansson/text-to-imagemagick",
"version": "hidden",
"input": {
"image": "https://replicate.delivery/pbxt/O3EyNFhlbJIkm1XIKm8uGgntp0cB2Nw3MRIcN7MRVcA6j0s1/me.png",
"prompt": "upside down"
},
"logs": "",
"output": {
"command": "convert /tmp/input_image.png -resize 350x350! -flip /tmp/output.png",
"image": "https://replicate.delivery/xezq/6SHVJaQgxVI2FZzMm7J6MA7i4h2OLDrsQOa7K53se4uKgV0KA/output.png"
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-11-12T21:37:20.642Z",
"started_at": "2025-11-12T21:37:21.117023Z",
"completed_at": "2025-11-12T21:37:25.822147Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/bcaaqsvh09rme0ctf80bjxkxn0/cancel",
"children": "https://api.replicate.com/v1/predictions/bcaaqsvh09rme0ctf80bjxkxn0/children",
"get": "https://api.replicate.com/v1/predictions/bcaaqsvh09rme0ctf80bjxkxn0",
"root": "https://api.replicate.com/v1/predictions/bcaaqsvh09rme0ctf80bjxkxn0",
"web": "https://replicate.com/p/bcaaqsvh09rme0ctf80bjxkxn0"
},
"metrics": {
"predict_time": 4.705123909,
"total_time": 5.180147214
}
}
