typetext
{
"aspect_ratio": "9:16",
"input_images": [
"https://replicate.delivery/pbxt/NcCZxmoh2Fubw6lM7GKMb540X6kGn9dsxOG33bBSWgunOJ8M/Screenshot%202025-08-26%20at%205.41.51%E2%80%AFPM.png"
],
"output_format": "jpg",
"prompt": "make the monkey a woman",
"reframe_prompt": ""
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_YtE**********************************
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 shridharathi/nano-banana-aspect-ratio using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "9:16",
input_images: ["https://replicate.delivery/pbxt/NcCZxmoh2Fubw6lM7GKMb540X6kGn9dsxOG33bBSWgunOJ8M/Screenshot%202025-08-26%20at%205.41.51%E2%80%AFPM.png"],
output_format: "jpg",
prompt: "make the monkey a woman",
reframe_prompt: ""
};
const output = await replicate.run("shridharathi/nano-banana-aspect-ratio", { 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_YtE**********************************
This is your API token. Keep it to yourself.
import replicate
Run shridharathi/nano-banana-aspect-ratio using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"shridharathi/nano-banana-aspect-ratio",
input={
"aspect_ratio": "9:16",
"input_images": ["https://replicate.delivery/pbxt/NcCZxmoh2Fubw6lM7GKMb540X6kGn9dsxOG33bBSWgunOJ8M/Screenshot%202025-08-26%20at%205.41.51%E2%80%AFPM.png"],
"output_format": "jpg",
"prompt": "make the monkey a woman",
"reframe_prompt": ""
}
)
# 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_YtE**********************************
This is your API token. Keep it to yourself.
Run shridharathi/nano-banana-aspect-ratio 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": "9:16",
"input_images": ["https://replicate.delivery/pbxt/NcCZxmoh2Fubw6lM7GKMb540X6kGn9dsxOG33bBSWgunOJ8M/Screenshot%202025-08-26%20at%205.41.51%E2%80%AFPM.png"],
"output_format": "jpg",
"prompt": "make the monkey a woman",
"reframe_prompt": ""
}
}' \
https://api.replicate.com/v1/models/shridharathi/nano-banana-aspect-ratio/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "5f31bw8wyhrm80cry6vvf18tcr",
"model": "shridharathi/nano-banana-aspect-ratio",
"version": "hidden",
"input": {
"aspect_ratio": "9:16",
"input_images": [
"https://replicate.delivery/pbxt/NcCZxmoh2Fubw6lM7GKMb540X6kGn9dsxOG33bBSWgunOJ8M/Screenshot%202025-08-26%20at%205.41.51%E2%80%AFPM.png"
],
"output_format": "jpg",
"prompt": "make the monkey a woman",
"reframe_prompt": ""
},
"logs": "",
"output": "https://replicate.delivery/xezq/F7do0gZeVQVjLis4vtqa3aGDl87wYPNcTcBnQdtCJxjnGynKA/tmp7ljz_5hp.jpg",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-28T17:26:06.324Z",
"started_at": "2025-08-28T17:26:06.821449Z",
"completed_at": "2025-08-28T17:26:39.981881Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/5f31bw8wyhrm80cry6vvf18tcr/cancel",
"children": "https://api.replicate.com/v1/predictions/5f31bw8wyhrm80cry6vvf18tcr/children",
"get": "https://api.replicate.com/v1/predictions/5f31bw8wyhrm80cry6vvf18tcr",
"root": "https://api.replicate.com/v1/predictions/5f31bw8wyhrm80cry6vvf18tcr",
"stream": "https://stream.replicate.com/v1/files/bcwr-mpmtwr46jqdam4g7sj424c6xqqsjxmutuenbznmiyrrpyrhrugaa",
"web": "https://replicate.com/p/5f31bw8wyhrm80cry6vvf18tcr"
},
"metrics": {
"predict_time": 33.16043209,
"total_time": 33.657881
}
}
