给定提示和/或输入图像,模型将生成新图像。
POST
/v1/images/generationsqwen-image-edit-2509
API Key application/json
请求示例
curl -X POST https://top.qingyuntop.ai/v1/images/generations \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-edit-2509",
"prompt": "把小鸭子放在女人的T恤上面",
"image": "https://v3.fal.media/files/penguin/XoW0qavfF-ahg-jX4BMyL_image.webp"
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Authorization | Header | string | 是 | - | Bearer {{YOUR_API_KEY}} |
model | JSON body | string | 是 | - | - |
prompt | JSON body | string | 是 | 提示词 | - |
image | JSON body | string | 是 | 图片url | - |
返回响应 (200)
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
data | 响应 JSON | array<object> | 是 | - | - |
data[].url | 响应 JSON | string | 否 | - | - |
created | 响应 JSON | integer | 是 | - | - |
usage | 响应 JSON | object | 是 | - | - |
usage.prompt_tokens | 响应 JSON | integer | 是 | - | - |
usage.completion_tokens | 响应 JSON | integer | 是 | - | - |
usage.total_tokens | 响应 JSON | integer | 是 | - | - |
usage.prompt_tokens_details | 响应 JSON | object | 是 | - | - |
usage.prompt_tokens_details.cached_tokens_details | 响应 JSON | object | 是 | - | - |
usage.completion_tokens_details | 响应 JSON | object | 是 | - | - |
usage.output_tokens | 响应 JSON | integer | 是 | - | - |
响应示例
{
"data": [
{
"url": "https://cdn.qwenlm.ai/output/629c2af9-f8d8-4667-b6c9-bede5854a4d4/t2i/c38fb9ef-7ede-48ff-8295-fc3388300b3b/1758636609.png?key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZV91c2VyX2lkIjoiNjI5YzJhZjktZjhkOC00NjY3LWI2YzktYmVkZTU4NTRhNGQ0IiwicmVzb3VyY2VfaWQiOiIxNzU4NjM2NjA5IiwicmVzb3VyY2VfY2hhdF9pZCI6IjQ2YzZhZTU0LWY1ZGQtNGI5Ni04YzIwLTE4MjY3MDAzNjAzZiJ9.ozZAA_-LDKY_WtsGAQvsuurIA-wWBxSmF1C64ueum1I"
}
],
"created": 1758636610
}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 497673331,
"name": "qwen-image-edit-2509",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "给定提示和/或输入图像,模型将生成新图像。\n\n\n",
"operationId": "",
"sourceUrl": "",
"method": "post",
"path": "/v1/images/generations",
"tags": [],
"status": 1,
"requestBody": {
"type": "application/json",
"parameters": [],
"jsonSchema": {
"type": "object",
"properties": {
"model": {
"type": "string"
},
"prompt": {
"type": "string",
"description": "提示词"
},
"image": {
"type": "string",
"description": "图片url"
}
},
"required": [
"model",
"prompt",
"image"
],
"x-apifox-orders": [
"model",
"prompt",
"image"
]
},
"examples": [
{
"value": "{\n \"model\": \"qwen-image-edit-2509\",\n \"prompt\": \"把小鸭子放在女人的T恤上面\",\n \"image\": \"https://v3.fal.media/files/penguin/XoW0qavfF-ahg-jX4BMyL_image.webp\"\n \n}",
"mediaType": "application/json",
"description": ""
}
],
"mediaType": "",
"oasExtensions": "",
"required": false,
"additionalContentTypes": []
},
"parameters": {
"path": [],
"query": [],
"cookie": [],
"header": [
{
"id": "GTujCrB2It",
"name": "Authorization",
"required": true,
"enable": true,
"description": "",
"type": "string",
"omitGeneratedExample": false,
"sampleValue": "Bearer {{YOUR_API_KEY}}"
}
]
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {
"type": "noauth"
},
"responses": [
{
"id": 138930671,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string"
}
},
"x-apifox-orders": [
"url"
]
}
},
"created": {
"type": "integer"
},
"usage": {
"type": "object",
"properties": {
"prompt_tokens": {
"type": "integer"
},
"completion_tokens": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"prompt_tokens_details": {
"type": "object",
"properties": {
"cached_tokens_details": {
"type": "object",
"properties": {},
"x-apifox-orders": []
}
},
"required": [
"cached_tokens_details"
],
"x-apifox-orders": [
"cached_tokens_details"
]
},
"completion_tokens_details": {
"type": "object",
"properties": {},
"x-apifox-orders": []
},
"output_tokens": {
"type": "integer"
}
},
"required": [
"prompt_tokens",
"completion_tokens",
"total_tokens",
"prompt_tokens_details",
"completion_tokens_details",
"output_tokens"
],
"x-apifox-orders": [
"prompt_tokens",
"completion_tokens",
"total_tokens",
"prompt_tokens_details",
"completion_tokens_details",
"output_tokens"
]
}
},
"required": [
"data",
"created",
"usage"
],
"x-apifox-orders": [
"data",
"created",
"usage"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": [],
"oasExtensions": ""
}
],
"responseExamples": [
{
"name": "成功示例",
"responseId": 138930671,
"data": "{\r\n \"data\": [\r\n {\r\n \"url\": \"https://cdn.qwenlm.ai/output/629c2af9-f8d8-4667-b6c9-bede5854a4d4/t2i/c38fb9ef-7ede-48ff-8295-fc3388300b3b/1758636609.png?key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZV91c2VyX2lkIjoiNjI5YzJhZjktZjhkOC00NjY3LWI2YzktYmVkZTU4NTRhNGQ0IiwicmVzb3VyY2VfaWQiOiIxNzU4NjM2NjA5IiwicmVzb3VyY2VfY2hhdF9pZCI6IjQ2YzZhZTU0LWY1ZGQtNGI5Ni04YzIwLTE4MjY3MDAzNjAzZiJ9.ozZAA_-LDKY_WtsGAQvsuurIA-wWBxSmF1C64ueum1I\"\r\n }\r\n ],\r\n \"created\": 1758636610\r\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fd25e-4be6-7169-93b6-94de7029804b"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92749332,
"ordering": 18,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {},
"isDefaultUrlEncoding": 1
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-05T14:40:23.000Z",
"updatedAt": "2026-08-05T14:40:31.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}