给定一个提示,该模型将返回一个或多个预测的完成,并且还可以返回每个位置的替代标记的概率。
为提供的提示和参数创建完成
官方文档: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 '{
"size": "2:3",
"prompt": "一只可爱的小猪",
"model": "jimeng-4.0"
}'| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Content-Type | Header | string | 是 | - | application/json |
Accept | Header | string | 是 | - | application/json |
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
prompt | JSON body | string | 是 | 所需图像的文本描述。最大长度为 1000 个字符。 | - |
size | JSON body | string | 是 | 生成图像的大小。必须是256x256、512x512或 1024x1024之一。 | - |
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
id | 响应 JSON | string | 是 | - | - |
object | 响应 JSON | string | 是 | - | - |
created | 响应 JSON | integer | 是 | - | - |
choices | 响应 JSON | array<object> | 是 | - | - |
choices[].index | 响应 JSON | integer | 否 | - | - |
choices[].message | 响应 JSON | object | 否 | - | - |
choices[].message.role | 响应 JSON | string | 是 | - | - |
choices[].message.content | 响应 JSON | string | 是 | - | - |
choices[].finish_reason | 响应 JSON | string | 否 | - | - |
usage | 响应 JSON | object | 是 | - | - |
usage.prompt_tokens | 响应 JSON | integer | 是 | - | - |
usage.completion_tokens | 响应 JSON | integer | 是 | - | - |
usage.total_tokens | 响应 JSON | integer | 是 | - | - |
{
"created": 1765863987,
"data": [
{
"url": "https://p19-dreamina-sign-sg.ibyteimg.com/tos-alisg-i-wopfjsm1ax-sg/66657fb2eac34a2490a2e5b02a10894e~tplv-wopfjsm1ax-aigc_resize:0:0.jpeg?lk3s=43402efa&x-expires=1767744000&x-signature=HPpUoqaNH%2Bnh%2BFmvJIuF6ETheZc%3D&format=.jpeg"
},
{
"url": "https://p16-dreamina-sign-sg.ibyteimg.com/tos-alisg-i-wopfjsm1ax-sg/0cf4043d94de432e8754fd6ff8e0278d~tplv-wopfjsm1ax-aigc_resize:0:0.jpeg?lk3s=43402efa&x-expires=1767744000&x-signature=K6pNWf3Yo%2FvgXHcmw30X6h00DRw%3D&format=.jpeg"
},
{
"url": "https://p16-dreamina-sign-sg.ibyteimg.com/tos-alisg-i-wopfjsm1ax-sg/7ef97eacbb7c4cc49ae427870c28309e~tplv-wopfjsm1ax-aigc_resize:0:0.jpeg?lk3s=43402efa&x-expires=1767744000&x-signature=7YW0XMwoA3vRc5RNFFwOMgWh0zE%3D&format=.jpeg"
},
{
"url": "https://p19-dreamina-sign-sg.ibyteimg.com/tos-alisg-i-wopfjsm1ax-sg/ea9d8881a8c34f4c8029fa2c89a9ec19~tplv-wopfjsm1ax-aigc_resize:0:0.jpeg?lk3s=43402efa&x-expires=1767744000&x-signature=2mLW1df9ACv%2FBbM3yp%2BCTxQIqoI%3D&format=.jpeg"
}
]
}以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 497673324,
"name": "创建绘画",
"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": {
"prompt": {
"description": "所需图像的文本描述。最大长度为 1000 个字符。",
"type": "string"
},
"size": {
"description": "生成图像的大小。必须是256x256、512x512或 1024x1024之一。",
"type": "string"
}
},
"required": [
"prompt",
"size"
],
"x-apifox-orders": [
"prompt",
"size"
]
},
"examples": [
{
"value": "{\n \"size\": \"2:3\",\n \"prompt\": \"一只可爱的小猪\",\n \"model\": \"jimeng-4.0\"\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"
},
"responses": [
{
"id": 107846329,
"name": "OK",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"created": {
"type": "integer"
},
"choices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer"
},
"message": {
"type": "object",
"properties": {
"role": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"role",
"content"
],
"x-apifox-orders": [
"role",
"content"
]
},
"finish_reason": {
"type": "string"
}
},
"x-apifox-orders": [
"index",
"message",
"finish_reason"
]
}
},
"usage": {
"type": "object",
"properties": {
"prompt_tokens": {
"type": "integer"
},
"completion_tokens": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
}
},
"required": [
"prompt_tokens",
"completion_tokens",
"total_tokens"
],
"x-apifox-orders": [
"prompt_tokens",
"completion_tokens",
"total_tokens"
]
}
},
"required": [
"id",
"object",
"created",
"choices",
"usage"
],
"x-apifox-orders": [
"id",
"object",
"created",
"choices",
"usage"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": [],
"oasExtensions": ""
}
],
"responseExamples": [
{
"name": "成功示例",
"responseId": 107846329,
"data": "{\r\n \"created\": 1765863987,\r\n \"data\": [\r\n {\r\n \"url\": \"https://p19-dreamina-sign-sg.ibyteimg.com/tos-alisg-i-wopfjsm1ax-sg/66657fb2eac34a2490a2e5b02a10894e~tplv-wopfjsm1ax-aigc_resize:0:0.jpeg?lk3s=43402efa&x-expires=1767744000&x-signature=HPpUoqaNH%2Bnh%2BFmvJIuF6ETheZc%3D&format=.jpeg\"\r\n },\r\n {\r\n \"url\": \"https://p16-dreamina-sign-sg.ibyteimg.com/tos-alisg-i-wopfjsm1ax-sg/0cf4043d94de432e8754fd6ff8e0278d~tplv-wopfjsm1ax-aigc_resize:0:0.jpeg?lk3s=43402efa&x-expires=1767744000&x-signature=K6pNWf3Yo%2FvgXHcmw30X6h00DRw%3D&format=.jpeg\"\r\n },\r\n {\r\n \"url\": \"https://p16-dreamina-sign-sg.ibyteimg.com/tos-alisg-i-wopfjsm1ax-sg/7ef97eacbb7c4cc49ae427870c28309e~tplv-wopfjsm1ax-aigc_resize:0:0.jpeg?lk3s=43402efa&x-expires=1767744000&x-signature=7YW0XMwoA3vRc5RNFFwOMgWh0zE%3D&format=.jpeg\"\r\n },\r\n {\r\n \"url\": \"https://p19-dreamina-sign-sg.ibyteimg.com/tos-alisg-i-wopfjsm1ax-sg/ea9d8881a8c34f4c8029fa2c89a9ec19~tplv-wopfjsm1ax-aigc_resize:0:0.jpeg?lk3s=43402efa&x-expires=1767744000&x-signature=2mLW1df9ACv%2FBbM3yp%2BCTxQIqoI%3D&format=.jpeg\"\r\n }\r\n ]\r\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fd25e-4be5-7428-af98-8fa47e225853"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92749329,
"ordering": 0,
"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": ""
}