生成图像
百炼qwen-image系列图片生成
POST
https://api.xiexus.cn/v1/images/generations
请求体:可选
接口信息
方法
POST路径
/v1/images/generations完整地址
https://api.xiexus.cn/v1/images/generations请求体
可选
标签
图像(Images)/通义千问OpenAI格式
响应码
200
静态文件
当前接口页内已嵌入 OpenAPI JSON;如果需要查看总文件,可直接打开固定静态文件
relay.json。当前 JSON
../../../openapi/generated/ai-model/图像(Images)/通义千问OpenAI格式/post-v1-images-generations-createimage-383833512.json总文件
../../../openapi/relay.jsonOpenAPI JSON
已将服务地址固定为
https://api.xiexus.cn,其余结构保持和源文档一致。{
"openapi": "3.1.0",
"info": {
"title": "生成图像",
"version": "1.0.0",
"description": " 百炼qwen-image系列图片生成"
},
"tags": [
{
"name": "图像(Images)/通义千问OpenAI格式"
}
],
"components": {
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "使用 Bearer Token 认证。\n格式: `Authorization: Bearer sk-xxxxxx`\n"
}
}
},
"paths": {
"/v1/images/generations": {
"post": {
"tags": [
"图像(Images)/通义千问OpenAI格式"
],
"summary": "生成图像",
"description": " 百炼qwen-image系列图片生成",
"operationId": "createimage",
"parameters": [],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"model": {
"type": "string"
},
"input": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string"
},
"content": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string"
}
},
"x-apifox-orders": [
"text"
]
}
}
},
"x-apifox-orders": [
"role",
"content"
]
}
}
},
"required": [
"messages"
],
"x-apifox-orders": [
"messages"
]
},
"parameters": {
"type": "object",
"properties": {
"negative_prompt": {
"type": "string"
},
"prompt_extend": {
"type": "boolean"
},
"watermark": {
"type": "boolean"
},
"size": {
"type": "string"
}
},
"x-apifox-orders": [
"negative_prompt",
"prompt_extend",
"watermark",
"size"
]
}
},
"required": [
"model",
"input"
],
"x-apifox-orders": [
"model",
"input",
"parameters"
]
}
}
}
},
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "成功生成图像",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"created": {
"type": "integer"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"b64_json": {
"type": "string"
},
"revised_prompt": {
"type": "string"
}
},
"x-apifox-orders": [
"url",
"b64_json",
"revised_prompt"
]
}
}
},
"x-apifox-orders": [
"created",
"data"
]
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.xiexus.cn",
"description": "固定生产地址"
}
]
}