Qwen Image

qwen-image-text-to-image

post

Qwen-Image is an image generation foundation model in the Qwen series that achieves significant advances in complex text rendering and precise image editing.

Header parameters
AuthorizationstringRequiredExample: sk-kEEV5TfTCTpE4uFwUg9p8UhVyVWpC9IEgOVezQ4b1ZCWQFCV
Body
modelstringRequired

model is the model name

Example: qwen-image-text-to-image
promptstringRequired

prompt is the prompt.

num_inference_stepsintegerOptional

The number of inference steps to perform. Default value: 30

Default: 30
guidance_scalenumberOptional

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: 2.5

Default: 2.5
seedintegerOptional

The same seed and the same prompt given to the same version of the model will output the same image every time.

negative_promptstringOptional

The negative prompt for the generation Default value: " "

Default:
accelerationstring · enumOptional

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. Default value: "none"

Default: nonePossible values:
enable_safety_checkerbooleanOptional

If set to true, the safety checker will be enabled. Default value: false

Default: false
nintegerOptional

n is the number of images to generate, default value is 1.

Default: 1
output_formatstring · enumOptional

output_format indicate the output format, default value is url.

Default: urlPossible values:
Responses
200Success
application/json
post
/v1/images/generations
POST /v1/images/generations HTTP/1.1
Host: image.onerouter.pro
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 265

{
  "model": "qwen-image-text-to-image",
  "prompt": "A cute baby sea otter.",
  "size": {
    "width": 1280,
    "height": 720
  },
  "num_inference_steps": 30,
  "guidance_scale": 2.5,
  "seed": 1,
  "negative_prompt": " ",
  "acceleration": "regular",
  "enable_safety_checker": false,
  "n": 1,
  "output_format": "url"
}
200Success
{
  "data": [
    {
      "url": "https://resource.onerouter.pro/image/generated%2Fonerouter_fe4771ae-d67c-41bb-a366-b07f1411ae06.png",
      "b64_json": "",
      "revised_prompt": ""
    }
  ],
  "created": 1760414675
}