给定一个提示,该模型将返回一个或多个预测的完成,并且还可以返回每个位置的替代标记的概率。
为提供的提示和参数创建完成
官方文档:https://platform.openai.com/docs/api-reference/images/create
/v1/images/generations给定一个提示,该模型将返回一个或多个预测的完成,并且还可以返回每个位置的替代标记的概率。
为提供的提示和参数创建完成
官方文档:https://platform.openai.com/docs/api-reference/images/create
curl -X POST https://top.qingyuntop.ai/v1/images/generations \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2-all",
"size": "1024x1024",
"n": 1,
"prompt": "将他们合并在一起",
"image": [
"https://imageproxy.zhongzhuan.chat/api/proxy/image/c42f4361295d6d70e3228498855c5814.png",
"https://imageproxy.zhongzhuan.chat/api/proxy/image/5b718c199e90b1fbbe06e7db9d88ebab.jpg"
]
}'| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Content-Type | Header | string | 是 | - | application/json |
Accept | Header | string | 是 | - | application/json |
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
model | JSON body | string | 是 | 用于生成图像的模型。 | - |
size | JSON body | string | 否 | 生成图像的尺寸。对于 GPT 图像模型,必须是 1024x1024 、 1536x1024 (横版)、 1024x1536 (竖版) | - |
n | JSON body | integer | 否 | 要生成的图像数量。 | - |
prompt | JSON body | string | 是 | 所需图像的文本描述。 | - |
image | JSON body | array<string> | 否 | 要编辑的图片。必须是受支持的图片文件或图片数组。最大可传5张。 | - |
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
created | 响应 JSON | integer | 是 | - | - |
data | 响应 JSON | array<object> | 是 | - | - |
data[].revised_prompt | 响应 JSON | string | 否 | - | - |
data[].url | 响应 JSON | string | 否 | - | - |
{
"created": 1776909189,
"data": [
{
"revised_prompt": "",
"url": "https://pro.filesystem.site/cdn/20260423/a8092bb17204bd0ed7cbd603c5b5c7.webp"
}
]
}以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 497673320,
"name": "创建 gpt-image-2-all",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "给定一个提示,该模型将返回一个或多个预测的完成,并且还可以返回每个位置的替代标记的概率。\n\n为提供的提示和参数创建完成\n\n官方文档:https://platform.openai.com/docs/api-reference/images/create",
"operationId": "",
"sourceUrl": "",
"method": "post",
"path": "/v1/images/generations",
"tags": [],
"status": 1,
"requestBody": {
"type": "application/json",
"parameters": [],
"jsonSchema": {
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "用于生成图像的模型。"
},
"size": {
"type": "string",
"description": "生成图像的尺寸。对于 GPT 图像模型,必须是 1024x1024 、 1536x1024 (横版)、 1024x1536 (竖版)"
},
"n": {
"type": "integer",
"description": "要生成的图像数量。"
},
"prompt": {
"type": "string",
"description": "所需图像的文本描述。"
},
"image": {
"type": "array",
"items": {
"type": "string"
},
"description": "要编辑的图片。必须是受支持的图片文件或图片数组。最大可传5张。"
}
},
"required": [
"model",
"prompt"
],
"x-apifox-orders": [
"model",
"size",
"n",
"prompt",
"image"
]
},
"examples": [
{
"value": "{\n \"model\": \"gpt-image-2-all\",\n \"size\": \"1024x1024\",\n \"n\": 1,\n \"prompt\": \"将他们合并在一起\",\n \"image\": [\n \"https://imageproxy.zhongzhuan.chat/api/proxy/image/c42f4361295d6d70e3228498855c5814.png\",\n \"https://imageproxy.zhongzhuan.chat/api/proxy/image/5b718c199e90b1fbbe06e7db9d88ebab.jpg\"\n ]\n}",
"mediaType": "application/json"
}
],
"mediaType": "",
"oasExtensions": "",
"required": false,
"additionalContentTypes": []
},
"parameters": {
"path": [],
"query": [],
"cookie": [],
"header": [
{
"id": "NQs7bxnpZf",
"name": "Content-Type",
"required": true,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "application/json"
},
{
"id": "qb8tEQbCty",
"name": "Accept",
"required": true,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "application/json"
},
{
"id": "gBxcCbXhsa",
"name": "Authorization",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "Bearer {{YOUR_API_KEY}}"
}
]
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {
"type": "noauth",
"noauth": {}
},
"responses": [
{
"id": 130185801,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {
"created": {
"type": "integer"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"revised_prompt": {
"type": "string"
},
"url": {
"type": "string"
}
},
"x-apifox-orders": [
"revised_prompt",
"url"
]
}
}
},
"required": [
"created",
"data"
],
"x-apifox-orders": [
"created",
"data"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": [],
"oasExtensions": ""
}
],
"responseExamples": [
{
"name": "OK",
"responseId": 130185801,
"data": "{\r\n \"created\": 1776909189,\r\n \"data\": [\r\n {\r\n \"revised_prompt\": \"\",\r\n \"url\": \"https://pro.filesystem.site/cdn/20260423/a8092bb17204bd0ed7cbd603c5b5c7.webp\"\r\n }\r\n ]\r\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fd25e-4be5-7428-af98-7ef1e4b2acb2"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92749327,
"ordering": 48,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {},
"isDefaultUrlEncoding": 1
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-05T14:40:23.000Z",
"updatedAt": "2026-08-06T12:15:55.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}