typetext
{
"aspect_ratio": "3:2",
"background": "auto",
"input_fidelity": "low",
"moderation": "auto",
"number_of_images": 1,
"output_compression": 90,
"output_format": "jpeg",
"prompt": "los angeles landscape skateboarding shot with the following style: late 1990s documentary street photography shot on 35mm color film, Leica M-style rangefinder camera with a 35mm lens, Kodak Portra 400 color palette, natural daylight, soft contrast, muted realistic colors, embedded film grain, slight edge softness, observational candid framing, no HDR, no modern digital sharpness, no cinematic lighting",
"quality": "high"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_ebW**********************************
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 openai/gpt-image-1.5 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "3:2",
background: "auto",
input_fidelity: "low",
moderation: "auto",
number_of_images: 1,
output_compression: 90,
output_format: "jpeg",
prompt: "los angeles landscape skateboarding shot with the following style: late 1990s documentary street photography shot on 35mm color film, Leica M-style rangefinder camera with a 35mm lens, Kodak Portra 400 color palette, natural daylight, soft contrast, muted realistic colors, embedded film grain, slight edge softness, observational candid framing, no HDR, no modern digital sharpness, no cinematic lighting",
quality: "high"
};
const output = await replicate.run("openai/gpt-image-1.5", { input });
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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_ebW**********************************
This is your API token. Keep it to yourself.
import replicate
Run openai/gpt-image-1.5 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"openai/gpt-image-1.5",
input={
"aspect_ratio": "3:2",
"background": "auto",
"input_fidelity": "low",
"moderation": "auto",
"number_of_images": 1,
"output_compression": 90,
"output_format": "jpeg",
"prompt": "los angeles landscape skateboarding shot with the following style: late 1990s documentary street photography shot on 35mm color film, Leica M-style rangefinder camera with a 35mm lens, Kodak Portra 400 color palette, natural daylight, soft contrast, muted realistic colors, embedded film grain, slight edge softness, observational candid framing, no HDR, no modern digital sharpness, no cinematic lighting",
"quality": "high"
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_ebW**********************************
This is your API token. Keep it to yourself.
Run openai/gpt-image-1.5 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": "3:2",
"background": "auto",
"input_fidelity": "low",
"moderation": "auto",
"number_of_images": 1,
"output_compression": 90,
"output_format": "jpeg",
"prompt": "los angeles landscape skateboarding shot with the following style: late 1990s documentary street photography shot on 35mm color film, Leica M-style rangefinder camera with a 35mm lens, Kodak Portra 400 color palette, natural daylight, soft contrast, muted realistic colors, embedded film grain, slight edge softness, observational candid framing, no HDR, no modern digital sharpness, no cinematic lighting",
"quality": "high"
}
}' \
https://api.replicate.com/v1/models/openai/gpt-image-1.5/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "r9tfqvaa7xrm80cv58v836mfx4",
"model": "openai/gpt-image-1.5",
"version": "hidden",
"input": {
"aspect_ratio": "3:2",
"background": "auto",
"input_fidelity": "low",
"moderation": "auto",
"number_of_images": 1,
"output_compression": 90,
"output_format": "jpeg",
"prompt": "los angeles landscape skateboarding shot with the following style: late 1990s documentary street photography shot on 35mm color film, Leica M-style rangefinder camera with a 35mm lens, Kodak Portra 400 color palette, natural daylight, soft contrast, muted realistic colors, embedded film grain, slight edge softness, observational candid framing, no HDR, no modern digital sharpness, no cinematic lighting",
"quality": "high"
},
"logs": "Model: gpt-image-1.5\nGenerating image...\nGenerated image in 55.2sec\nGenerated 1 images\nInput text token count: 88\nInput image token count: 0\nOutput token count: 6649",
"output": [
"https://replicate.delivery/xezq/blJQLMYDsk6oMBTU4vO4D2Jmjoa0OY9iu72baLq8yzoZMf5KA/tmpsjqw2di6.jpeg"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-12-17T02:49:19.679Z",
"started_at": "2025-12-17T02:49:19.708792Z",
"completed_at": "2025-12-17T02:50:15.082993Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/r9tfqvaa7xrm80cv58v836mfx4/cancel",
"get": "https://api.replicate.com/v1/predictions/r9tfqvaa7xrm80cv58v836mfx4",
"stream": "https://stream.replicate.com/v1/files/bcwr-k73s3sgsy45ydwwdag72lh6fnjshsti3yrisjnaedm76tmvu3trq",
"web": "https://replicate.com/p/r9tfqvaa7xrm80cv58v836mfx4"
},
"metrics": {
"predict_time": 55.374201288,
"total_time": 55.403993454
}
}