Skip to main content
Model ID
alibaba/qwen-image-2.0-pro
See pricing & more on mynth.io.

Capabilities

ModesText-to-image · Image-to-image
InputsUp to 1 image (image-to-image)
Native auto sizeNo
Magic promptSupported
Native enhance promptYes

Generate

import Mynth from "@mynthio/sdk";

const mynth = new Mynth();

const task = await mynth.image.generate({
  prompt: "Architectural photograph of a brutalist library at golden hour",
  model: "alibaba/qwen-image-2.0-pro",
  size: "landscape",
  count: 1,
});

console.log(task.urls);
curl https://api.mynth.io/image/generate \
  -X POST \
  -H "Authorization: Bearer $MYNTH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Architectural photograph of a brutalist library at golden hour",
    "model": "alibaba/qwen-image-2.0-pro",
    "size": "landscape",
    "count": 1
  }'

Use inputs

Pass up to 1 input image for image-to-image. URLs or uploaded files both work. See Upload input images.
const task = await mynth.image.generate({
  prompt: "Restyle this photo as a cinematic still",
  model: "alibaba/qwen-image-2.0-pro",
  inputs: ["https://example.com/input-image.jpg"],
  size: "landscape",
});
curl https://api.mynth.io/image/generate \
  -X POST \
  -H "Authorization: Bearer $MYNTH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Restyle this photo as a cinematic still",
    "model": "alibaba/qwen-image-2.0-pro",
    "inputs": [
      {
        "type": "image",
        "source": { "type": "url", "url": "https://example.com/input-image.jpg" }
      }
    ],
    "size": "landscape"
  }'