qwen-image-max

POST /v1/images/generations

MethodPOST
Path/v1/images/generations
Typehttp
Status-2
Module2102810
Folder67328467

概览

MethodPOST
Path/v1/images/generations
Typehttp
Status-2
Module2102810
Folder67328467

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "model": {
        "type": "string",
        "description": "模型名称"
      },
      "prompt": {
        "type": "string",
        "description": "图像描述"
      },
      "size": {
        "type": "string",
        "description": "图像尺寸"
      },
      "n": {
        "type": "integer",
        "description": "生成数量 只支持1张"
      },
      "watermark": {
        "type": "boolean",
        "description": "是否水印"
      },
      "prompt_extend": {
        "type": "boolean",
        "description": "AI优化提示词 默认开启"
      }
    },
    "required": [
      "model",
      "prompt",
      "size",
      "n",
      "watermark",
      "prompt_extend"
    ],
    "x-apifox-orders": [
      "model",
      "prompt",
      "size",
      "n",
      "watermark",
      "prompt_extend"
    ]
  },
  "required": true,
  "mediaType": "",
  "examples": [
    {
      "mediaType": "application/json",
      "value": "{\r\n  \"model\": \"qwen-image-max\",\r\n  \"prompt\": \"一只可爱的橘猫坐在窗台上,阳光洒在它身上,背景是城市风景\",\r\n  \"size\": \"1328x1328\",\r\n  \"n\": 1,\r\n  \"watermark\": false,\r\n  \"prompt_extend\": true\r\n}",
      "name": "示例 1"
    }
  ],
  "oasExtensions": ""
}

响应

[
  {
    "id": 131456485,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {
        "created": {
          "type": "integer"
        },
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "b64_json": {
                "type": "string"
              }
            },
            "x-apifox-orders": [
              "url",
              "b64_json"
            ]
          }
        }
      },
      "required": [
        "created",
        "data"
      ],
      "x-apifox-orders": [
        "created",
        "data"
      ]
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": []
  }
]

响应示例

[
  {
    "name": "成功示例",
    "responseId": 131456485,
    "data": "{\r\n  \"created\": 1767842675,\r\n  \"data\": [\r\n    {\r\n      \"url\": \"https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/...\",\r\n      \"b64_json\": \"\"\r\n    }\r\n  ]\r\n}",
    "id": "019b9bbc-1b1e-746f-bdb3-8d4dfc7f27ba"
  }
]