POST
/
v1
/
images
/
generations
curl -X POST "https://api.applerouter.ai/v1/images/generations" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-image-plus",
    "input": {
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "text": "A traditional Chinese painting of mountains and rivers"
            }
          ]
        }
      ]
    },
    "parameters": {
      "prompt_extend": true,
      "watermark": false,
      "size": "1328*1328"
    }
  }'
{
  "created": 1713833628,
  "data": [
    {
      "url": "https://example.com/qwen-image.png",
      "revised_prompt": "Enhanced prompt used for generation..."
    }
  ]
}

Overview

Generate images using Alibaba’s Tongyi Wanxiang image series models (qwen-image-plus, etc.).
model
string
required
The model to use (e.g. qwen-image-plus)
input
object
required
Input object containing the message array
parameters
object
Generation parameters including: - negative_prompt: Content to avoid in the image (Negative Prompt) - prompt_extend: Enable Prompt enhancement - watermark: Add Watermark - size: Image Size (e.g. 1328*1328)
curl -X POST "https://api.applerouter.ai/v1/images/generations" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-image-plus",
    "input": {
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "text": "A traditional Chinese painting of mountains and rivers"
            }
          ]
        }
      ]
    },
    "parameters": {
      "prompt_extend": true,
      "watermark": false,
      "size": "1328*1328"
    }
  }'
{
  "created": 1713833628,
  "data": [
    {
      "url": "https://example.com/qwen-image.png",
      "revised_prompt": "Enhanced prompt used for generation..."
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required
input
object
required
parameters
object

Response

200 - application/json

成功生成图像

created
integer
data
object[]