All models
Alibaba
Image
Available
Qwen Image Edit
Image Editing
From 60 credits (≈ ₹60.00) per request.
Parameters
| Parameter | Type | Description |
|---|---|---|
promptRequired |
string | The prompt to generate the image with (Max length: 2000 characters) max length 2000 |
image_urlRequired |
string | The URL of the image to edit. (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB) format: uri |
acceleration |
string | Acceleration level for image generation. Options: 'none', 'regular', 'high'. Higher acceleration increases speed. 'regular' balances speed and quality. Default value: "none" one of: "none", "regular", "high" · default "none" |
image_size |
string | The size of the generated image. Default value: landscape_4_3 one of: "square", "square_hd", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9" · default "landscape_4_3" |
num_inference_steps |
number | The number of inference steps to perform. Default value: 30 (Min: 2, Max: 49, Step: 1) (step: 1) min 2 · max 49 · default 25 |
seed |
integer | The same seed and the same prompt given to the same version of the model will output the same image every time. |
guidance_scale |
number | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. Default value: 4 (Min: 0, Max: 20, Step: 0.1) (step: 0.1) min 0 · max 20 · default 4 |
num_images |
string | num_images one of: "1", "2", "3", "4" |
enable_safety_checker |
boolean | If set to true, the safety checker will be enabled. Default value: true (Boolean value (true/false)) |
output_format |
string | The format of the generated image. Default value: "png" one of: "jpeg", "png" · default "png" |
negative_prompt |
string | The negative prompt for the generation Default value: " " (Max length: 500 characters) max length 500 |
nsfw_checker |
boolean | Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model. |
What you get back
Files arrive in output.files[] as private links that expire, with their type and size.
Use it from your code
# 1. Create the task
curl https://nexus.promptscenes.in/api/v1/tasks \
-H "Authorization: Bearer $NEXUS_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "qwen-image-edit",
"input": {
"prompt": "A cinematic shot of a lighthouse at dawn",
"image_url": "https://example.com/input.png",
"acceleration": "none",
"image_size": "landscape_4_3",
"num_inference_steps": 25,
"guidance_scale": 4,
"num_images": "1",
"output_format": "png"
},
"callback_url": "https://your-app.com/webhooks/nexus"
}'
# 2. Poll for the result
curl https://nexus.promptscenes.in/api/v1/tasks/TASK_ID \
-H "Authorization: Bearer $NEXUS_API_KEY"
import os, time, uuid, requests
API = "https://nexus.promptscenes.in/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['NEXUS_API_KEY']}"}
task = requests.post(
f"{API}/tasks",
headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
json={
"model": "qwen-image-edit",
"input": {
"prompt": "A cinematic shot of a lighthouse at dawn",
"image_url": "https://example.com/input.png",
"acceleration": "none",
"image_size": "landscape_4_3",
"num_inference_steps": 25,
"guidance_scale": 4,
"num_images": "1",
"output_format": "png",
},
"callback_url": "https://your-app.com/webhooks/nexus",
},
).json()
while task["status"] not in ("succeeded", "failed", "cancelled"):
time.sleep(3)
task = requests.get(f"{API}/tasks/{task['id']}", headers=HEADERS).json()
print(task["status"], task.get("output"))
const API = "https://nexus.promptscenes.in/api/v1";
const headers = {
Authorization: `Bearer ${process.env.NEXUS_API_KEY}`,
"Content-Type": "application/json",
};
let task = await fetch(`${API}/tasks`, {
method: "POST",
headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
body: JSON.stringify({
"model": "qwen-image-edit",
"input": {
"prompt": "A cinematic shot of a lighthouse at dawn",
"image_url": "https://example.com/input.png",
"acceleration": "none",
"image_size": "landscape_4_3",
"num_inference_steps": 25,
"guidance_scale": 4,
"num_images": "1",
"output_format": "png"
},
"callback_url": "https://your-app.com/webhooks/nexus"
}),
}).then((r) => r.json());
while (!["succeeded", "failed", "cancelled"].includes(task.status)) {
await new Promise((r) => setTimeout(r, 3000));
task = await fetch(`${API}/tasks/${task.id}`, { headers }).then((r) => r.json());
}
console.log(task.status, task.output);
Request
{
"model": "qwen-image-edit",
"input": {
"prompt": "A cinematic shot of a lighthouse at dawn",
"image_url": "https://example.com/input.png",
"acceleration": "none",
"image_size": "landscape_4_3",
"num_inference_steps": 25,
"guidance_scale": 4,
"num_images": "1",
"output_format": "png"
}
}
Response
{
"id": "6f1c…",
"object": "task",
"model": "qwen-image-edit",
"status": "succeeded",
"output": {
"files": [
{
"url": "https://…signed…",
"mime": "…",
"size": 0
}
]
},
"estimated_cost": "…",
"charged": "…"
}