typetext
{
"aspect_ratio": "match_input_image",
"go_fast": true,
"image": [
"https://replicate.delivery/pbxt/NtXvWITwTHIlV8GLIZzfxk92Ned2XfWh1XHnEDkopp0fnHpq/replicate-prediction-szevjj34d5rm80csxc9bfdgz3m%20%281%29.webp"
],
"output_format": "webp",
"output_quality": 95,
"prompt": "remove the people from the boat. Do not change the photo otherwise"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_dLl**********************************
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 qwen/qwen-image-edit-plus using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "match_input_image",
go_fast: true,
image: ["https://replicate.delivery/pbxt/NtXvWITwTHIlV8GLIZzfxk92Ned2XfWh1XHnEDkopp0fnHpq/replicate-prediction-szevjj34d5rm80csxc9bfdgz3m%20%281%29.webp"],
output_format: "webp",
output_quality: 95,
prompt: "remove the people from the boat. Do not change the photo otherwise"
};
const output = await replicate.run("qwen/qwen-image-edit-plus", { 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_dLl**********************************
This is your API token. Keep it to yourself.
import replicate
Run qwen/qwen-image-edit-plus using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"qwen/qwen-image-edit-plus",
input={
"aspect_ratio": "match_input_image",
"go_fast": True,
"image": ["https://replicate.delivery/pbxt/NtXvWITwTHIlV8GLIZzfxk92Ned2XfWh1XHnEDkopp0fnHpq/replicate-prediction-szevjj34d5rm80csxc9bfdgz3m%20%281%29.webp"],
"output_format": "webp",
"output_quality": 95,
"prompt": "remove the people from the boat. Do not change the photo otherwise"
}
)
# 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_dLl**********************************
This is your API token. Keep it to yourself.
Run qwen/qwen-image-edit-plus 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": "match_input_image",
"go_fast": true,
"image": ["https://replicate.delivery/pbxt/NtXvWITwTHIlV8GLIZzfxk92Ned2XfWh1XHnEDkopp0fnHpq/replicate-prediction-szevjj34d5rm80csxc9bfdgz3m%20%281%29.webp"],
"output_format": "webp",
"output_quality": 95,
"prompt": "remove the people from the boat. Do not change the photo otherwise"
}
}' \
https://api.replicate.com/v1/models/qwen/qwen-image-edit-plus/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "7asfcbke4srme0csxndanxmt40",
"model": "qwen/qwen-image-edit-plus",
"version": "hidden",
"input": {
"aspect_ratio": "match_input_image",
"go_fast": true,
"image": [
"https://replicate.delivery/pbxt/NtXvWITwTHIlV8GLIZzfxk92Ned2XfWh1XHnEDkopp0fnHpq/replicate-prediction-szevjj34d5rm80csxc9bfdgz3m%20%281%29.webp"
],
"output_format": "webp",
"output_quality": 95,
"prompt": "remove the people from the boat. Do not change the photo otherwise"
},
"logs": "Using seed: 722287\nGeneration took 5.18 seconds\nTotal safe images: 1 out of 1",
"output": [
"https://replicate.delivery/xezq/G3ueacopF4T3ICUim9Srf3EVkfPCl4NGeS9ATDWrYkizorerC/out-0.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-10-16T14:09:10.694Z",
"started_at": "2025-10-16T14:09:11.421701Z",
"completed_at": "2025-10-16T14:09:16.878554Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/7asfcbke4srme0csxndanxmt40/cancel",
"get": "https://api.replicate.com/v1/predictions/7asfcbke4srme0csxndanxmt40",
"stream": "https://stream.replicate.com/v1/files/bcwr-r4d3rrpforodpop7ovnjxx77o4n745vv5xuicx4lp5op2xgfhjmq",
"web": "https://replicate.com/p/7asfcbke4srme0csxndanxmt40"
},
"metrics": {
"predict_time": 5.456853459,
"total_time": 6.184554
}
}
