# 文生图接口 (openai-cv-service-smzdm-com/)
# 基本信息
Path: /pictures/create_img_by_mj
Method: POST
接口描述:
# 接口描述
SD文生图接口-YApi-高效、易用、功能强大的可视化接口管理平台 (smzdm.com) (opens new window)
请求示例:
{
"prompt":"a gril",
"batch_size":2,
"upload_img_config": {
"channel":29,
"type":"linkstars",
"oper":"aigc"
},
"is_split":1
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
返回示例:
{
"error_code":0,
"error_msg":"",
"data": {
"latest_image_url":"https://cdn.discordapp.com/attachments/1253533767893782598/1299295082415132672/chenruibin0425_a_gril_a6b269bb-4f8c-4ba6-9104-1185f89478df.png?ex=671cae57&is=671b5cd7&hm=8719a6fe8b48d0db07cf8ef1bd46abcfd332cfe6474520946da7625b506a0567&",
"image_url":"https://yp-image-aigc.zdmimg.com/aigcimage/20241025/ad45523528c54541b60f84e0d0bcb112.png",
"nickname":"",
"ip":"",
"error_code":0,
"error_msg":"",
"upload_pic":"",
"seg_images": [
"https://yp-image-aigc.zdmimg.com/aigcimage/20241025/ad45523528c54541b60f84e0d0bcb112_1.png",
"https://yp-image-aigc.zdmimg.com/aigcimage/20241025/ad45523528c54541b60f84e0d0bcb112_2.png"
],
"upload_return": []
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 请求参数
Headers
参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
---|---|---|---|---|
Content-Type | application/json | 是 |
Body
参数名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
prompt | string | 否 | 提示词 | ||
upload_img_config | string | 是 | 上传配置,不写不上传,比如:{"channel": 1202, "type": "aigc-image", "oper": "aigc"} | ||
batch_size | string | 是 | 分割图片数量,最高4张 | ||
is_split | number | 是 | 是否支持分割,1分割0不分割 | ||
from | string | 是 | 来源 |
# 返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
error_code | number | 非必须 | |||
error_msg | string | 非必须 | |||
data | object | 非必须 | |||
├─ image_url | string | 非必须 | 图片URL(用这个) | ||
├─ latest_image_url | string | 非必须 | 原始URL(需要翻墙) | ||
├─ upload_pic | string | 必须 | 上传图床地址 | ||
├─ seg_images | string [] | 必须 | 分割图片数组,数量和batch_size对应 | item 类型: string | |
├─ | 非必须 |