使用 lcm 将文本转为图像
开发环境
开发环境
POST
/v3/lcm-txt2img
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v3/lcm-txt2img' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "A dog",
"height": 1024,
"width": 1024,
"image_num": 1,
"steps": 8,
"guidance_scale": 8
}'
响应示例响应示例
[
[
{
"image_file": "",
"image_type": ""
}
],
500,
"INTERNAL",
"failed to exec task, err: failed to lcm-txt2img: failed to request API: invalid api status code: 500, body: {\"code\":2,\"message\":\"NoneType: None\\n\"}",
{
"task_id": "4788a484-9a17-4a6f-8441-743c9b6763b2"
}
]
请求参数
Header 参数
Authorization
string
必需
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
返回响应
修改于 2024-02-05 08:40:33