typetext
{
"aspect_ratio": "match_input_image",
"go_fast": true,
"image": [
"https://replicate.delivery/pbxt/NtYIv8Q0ZA9qJZbFrICy9lQfQNWOQeuajMX2AwBvOa6AjHDA/replicate-prediction-szevjj34d5rm80csxc9bfdgz3m%20%281%29.webp"
],
"output_format": "webp",
"output_quality": 95,
"prompt": "show only the people on a white background"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_8cC**********************************
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/NtYIv8Q0ZA9qJZbFrICy9lQfQNWOQeuajMX2AwBvOa6AjHDA/replicate-prediction-szevjj34d5rm80csxc9bfdgz3m%20%281%29.webp"],
output_format: "webp",
output_quality: 95,
prompt: "show only the people on a white background"
};
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_8cC**********************************
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/NtYIv8Q0ZA9qJZbFrICy9lQfQNWOQeuajMX2AwBvOa6AjHDA/replicate-prediction-szevjj34d5rm80csxc9bfdgz3m%20%281%29.webp"],
"output_format": "webp",
"output_quality": 95,
"prompt": "show only the people on a white background"
}
)
# 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_8cC**********************************
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/NtYIv8Q0ZA9qJZbFrICy9lQfQNWOQeuajMX2AwBvOa6AjHDA/replicate-prediction-szevjj34d5rm80csxc9bfdgz3m%20%281%29.webp"],
"output_format": "webp",
"output_quality": 95,
"prompt": "show only the people on a white background"
}
}' \
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": "nme80z0bhdrmc0csxnrvppxz3g",
"model": "qwen/qwen-image-edit-plus",
"version": "hidden",
"input": {
"aspect_ratio": "match_input_image",
"go_fast": true,
"image": [
"https://replicate.delivery/pbxt/NtYIv8Q0ZA9qJZbFrICy9lQfQNWOQeuajMX2AwBvOa6AjHDA/replicate-prediction-szevjj34d5rm80csxc9bfdgz3m%20%281%29.webp"
],
"output_format": "webp",
"output_quality": 95,
"prompt": "show only the people on a white background"
},
"logs": "Using seed: 40063\nGeneration took 5.19 seconds\nTotal safe images: 1 out of 1",
"output": [
"https://replicate.delivery/xezq/MXSUB84Rty4dOZWorJeWXP2D98bafLiKcISlxv2LyubXRrfqA/out-0.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-10-16T14:33:52.779Z",
"started_at": "2025-10-16T14:33:53.851678Z",
"completed_at": "2025-10-16T14:33:59.26315Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/nme80z0bhdrmc0csxnrvppxz3g/cancel",
"get": "https://api.replicate.com/v1/predictions/nme80z0bhdrmc0csxnrvppxz3g",
"stream": "https://stream.replicate.com/v1/files/bcwr-gzjnoyznwqnarthbup26osn7ivcrmpb4n3t2whsnp3ienbhx6tdq",
"web": "https://replicate.com/p/nme80z0bhdrmc0csxnrvppxz3g"
},
"metrics": {
"predict_time": 5.41147222,
"total_time": 6.48415
}
}
