Nexus
All models
Alibaba Image Available

Qwen Image to Image

Image generation by Qwen's advanced AI model

Image to Image

From 60 credits (≈ ₹60.00) per request.

Parameters

ParameterTypeDescription
promptRequired string The prompt to generate the image with (Max length: 5000 characters)
max length 5000
image_urlRequired string The reference image to guide the generation (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB)
format: uri
strength number Denoising strength. 1.0 = fully remake; 0.0 = preserve original (Min: 0, Max: 1, Step: 0.01) (step: 0.01)
min 0 · max 1 · default 0.8
output_format string The format of the generated image
one of: "png", "jpeg" · default "png"
acceleration string Acceleration level for image generation. Options: 'none', 'regular', 'high'. Higher acceleration increases speed. 'regular' balances speed and quality. 'high' is recommended for images without text
one of: "none", "regular", "high" · default "none"
negative_prompt string The negative prompt for the generation (Max length: 500 characters)
max length 500
seed integer The same seed and the same prompt given to the same version of the model will output the same image every time
num_inference_steps number The number of inference steps to perform (Min: 2, Max: 250, Step: 1) (step: 1)
min 2 · max 250 · default 30
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 (Min: 0, Max: 20, Step: 0.1) (step: 0.1)
min 0 · max 20 · default 2.5
enable_safety_checker boolean The safety checker is always enabled in Playground. It can only be disabled by setting false through the API. (Boolean value (true/false))
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-to-image",
    "input": {
        "prompt": "A cinematic shot of a lighthouse at dawn",
        "image_url": "https://example.com/input.png",
        "strength": 0.8,
        "output_format": "png",
        "acceleration": "none",
        "num_inference_steps": 30,
        "guidance_scale": 2.5
    },
    "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-to-image",
        "input": {
            "prompt": "A cinematic shot of a lighthouse at dawn",
            "image_url": "https://example.com/input.png",
            "strength": 0.8,
            "output_format": "png",
            "acceleration": "none",
            "num_inference_steps": 30,
            "guidance_scale": 2.5,
        },
        "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-to-image",
      "input": {
          "prompt": "A cinematic shot of a lighthouse at dawn",
          "image_url": "https://example.com/input.png",
          "strength": 0.8,
          "output_format": "png",
          "acceleration": "none",
          "num_inference_steps": 30,
          "guidance_scale": 2.5
      },
      "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-to-image",
    "input": {
        "prompt": "A cinematic shot of a lighthouse at dawn",
        "image_url": "https://example.com/input.png",
        "strength": 0.8,
        "output_format": "png",
        "acceleration": "none",
        "num_inference_steps": 30,
        "guidance_scale": 2.5
    }
}

Response

{
    "id": "6f1c…",
    "object": "task",
    "model": "qwen-image-to-image",
    "status": "succeeded",
    "output": {
        "files": [
            {
                "url": "https://…signed…",
                "mime": "…",
                "size": 0
            }
        ]
    },
    "estimated_cost": "…",
    "charged": "…"
}