typetext
{
"aspect_ratio": "match_input_image",
"go_fast": true,
"image": [
"https://replicate.delivery/pbxt/NtOB4EakRekNxukZiOhD8ZRel3B5SzWFA0uJPFZGSIDJ84xr/replicate-prediction-t8q8xdnec9rmc0csxc6af9vz3c.webp"
],
"output_format": "webp",
"output_quality": 95,
"prompt": "Make the ocean swell, parted by the boat on either side, light catching the sun magestically. No water on the deck"
}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/NtOB4EakRekNxukZiOhD8ZRel3B5SzWFA0uJPFZGSIDJ84xr/replicate-prediction-t8q8xdnec9rmc0csxc6af9vz3c.webp"],
output_format: "webp",
output_quality: 95,
prompt: "Make the ocean swell, parted by the boat on either side, light catching the sun magestically. No water on the deck"
};
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/NtOB4EakRekNxukZiOhD8ZRel3B5SzWFA0uJPFZGSIDJ84xr/replicate-prediction-t8q8xdnec9rmc0csxc6af9vz3c.webp"],
"output_format": "webp",
"output_quality": 95,
"prompt": "Make the ocean swell, parted by the boat on either side, light catching the sun magestically. No water on the deck"
}
)
# 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/NtOB4EakRekNxukZiOhD8ZRel3B5SzWFA0uJPFZGSIDJ84xr/replicate-prediction-t8q8xdnec9rmc0csxc6af9vz3c.webp"],
"output_format": "webp",
"output_quality": 95,
"prompt": "Make the ocean swell, parted by the boat on either side, light catching the sun magestically. No water on the deck"
}
}' \
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": "szevjj34d5rm80csxc9bfdgz3m",
"model": "qwen/qwen-image-edit-plus",
"version": "hidden",
"input": {
"aspect_ratio": "match_input_image",
"go_fast": true,
"image": [
"https://replicate.delivery/pbxt/NtOB4EakRekNxukZiOhD8ZRel3B5SzWFA0uJPFZGSIDJ84xr/replicate-prediction-t8q8xdnec9rmc0csxc6af9vz3c.webp"
],
"output_format": "webp",
"output_quality": 95,
"prompt": "Make the ocean swell, parted by the boat on either side, light catching the sun magestically. No water on the deck"
},
"logs": "Using seed: 722675\nGeneration took 5.13 seconds\nTotal safe images: 1 out of 1",
"output": [
"https://replicate.delivery/xezq/SaYHs4z2ZH7oDhv1AaSRVED32EhFdEowp9dnhcDP0oCCZ4XF/out-0.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-10-16T03:31:15.177Z",
"started_at": "2025-10-16T03:31:15.186216Z",
"completed_at": "2025-10-16T03:31:20.5974Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/szevjj34d5rm80csxc9bfdgz3m/cancel",
"get": "https://api.replicate.com/v1/predictions/szevjj34d5rm80csxc9bfdgz3m",
"stream": "https://stream.replicate.com/v1/files/bcwr-6iqgyvv4lou43g6qm4tpmk7ymrsicx7jiearjudvotnlkvw6d2sq",
"web": "https://replicate.com/p/szevjj34d5rm80csxc9bfdgz3m"
},
"metrics": {
"predict_time": 5.411184738,
"total_time": 5.4204
}
}
