typefile
{
"image": "https://replicate.delivery/pbxt/NXcD8ygbIdiv9Mma93PmfbwO3i0SrcBQje3gpKMZzz6Xli8U/gettyimages-1584636799-65a15f0f1a6d7.avif",
"max_dimension": 1536,
"model": "ideogram-ai/ideogram-v2",
"outpaint": "Zoom out 2x",
"prompt": "nighttime tokyo"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_IRP**********************************
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/outpainter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
image: "https://replicate.delivery/pbxt/NXcD8ygbIdiv9Mma93PmfbwO3i0SrcBQje3gpKMZzz6Xli8U/gettyimages-1584636799-65a15f0f1a6d7.avif",
max_dimension: 1536,
model: "ideogram-ai/ideogram-v2",
outpaint: "Zoom out 2x",
prompt: "nighttime tokyo"
};
const output = await replicate.run("pipeline-examples/outpainter", { 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_IRP**********************************
This is your API token. Keep it to yourself.
import replicate
Run pipeline-examples/outpainter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pipeline-examples/outpainter",
input={
"image": "https://replicate.delivery/pbxt/NXcD8ygbIdiv9Mma93PmfbwO3i0SrcBQje3gpKMZzz6Xli8U/gettyimages-1584636799-65a15f0f1a6d7.avif",
"max_dimension": 1536,
"model": "ideogram-ai/ideogram-v2",
"outpaint": "Zoom out 2x",
"prompt": "nighttime tokyo"
}
)
# 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_IRP**********************************
This is your API token. Keep it to yourself.
Run pipeline-examples/outpainter 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/NXcD8ygbIdiv9Mma93PmfbwO3i0SrcBQje3gpKMZzz6Xli8U/gettyimages-1584636799-65a15f0f1a6d7.avif",
"max_dimension": 1536,
"model": "ideogram-ai/ideogram-v2",
"outpaint": "Zoom out 2x",
"prompt": "nighttime tokyo"
}
}' \
https://api.replicate.com/v1/models/pipeline-examples/outpainter/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "7pvn15z60xrmc0crnwnv5sbycw",
"model": "pipeline-examples/outpainter",
"version": "hidden",
"input": {
"image": "https://replicate.delivery/pbxt/NXcD8ygbIdiv9Mma93PmfbwO3i0SrcBQje3gpKMZzz6Xli8U/gettyimages-1584636799-65a15f0f1a6d7.avif",
"max_dimension": 1536,
"model": "ideogram-ai/ideogram-v2",
"outpaint": "Zoom out 2x",
"prompt": "nighttime tokyo"
},
"logs": "",
"output": "https://replicate.delivery/xezq/Pu8jLQc3rXZeECzcQlTJcgSTyjJMeo8CWfAcLnx3JcIGSnWqA/tmpaa6bf7sv.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-15T19:19:06.503Z",
"started_at": "2025-08-15T19:19:06.965276Z",
"completed_at": "2025-08-15T19:19:31.704989Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/7pvn15z60xrmc0crnwnv5sbycw/cancel",
"children": "https://api.replicate.com/v1/predictions/7pvn15z60xrmc0crnwnv5sbycw/children",
"get": "https://api.replicate.com/v1/predictions/7pvn15z60xrmc0crnwnv5sbycw",
"root": "https://api.replicate.com/v1/predictions/7pvn15z60xrmc0crnwnv5sbycw",
"stream": "https://stream.replicate.com/v1/files/bcwr-72kiay6q5eceifvqydplxoycf757qt4n2enpa2ftchbwfcfdmc6q",
"web": "https://replicate.com/p/7pvn15z60xrmc0crnwnv5sbycw"
},
"metrics": {
"predict_time": 24.739712872,
"total_time": 25.201989
}
}
