提交角色生图

请求URL:

  • /createRoleImage

请求方式:

  • POST

参数:

参数名 必选 类型 说明
id int 角色ID
type int 类型:1-头像;2-背景图
modelName string 模型名称
loraName string Lora名称
prompt string 提示词
batchSize int 生图数量
image string 图片完整地址(图生图时必传,文生图时必不传)
callBackUrl string 回调地址

返回示例

{
    "code": 200,
    "msg": "SUCCESS",
    "data": {
        "promptId": "xxxxx"
    }
}

返回参数说明

参数名 类型 说明
code int 状态码
msg string 提示信息
data struct 生图提示词
- promptId string 生图任务ID

备注

生图成功后,服务器会回调callBackUrl地址;

回调失败会重试5次;当收到{"code":200, "msg": "SUCCESS"}则认为回调成功

回调参数:

{
    "promptId": "任务ID",
    "roleId":   1, # 角色ID
    "type":     1, #类型:1-头像;2-背景
    "images":   [
        {"thumb": "缩略图地址", "origin": "原图地址"}
    ],
}
2021 © Live all right reserved,powered by Gitbook该文件修订时间: 2025-09-17 13:25:41

results matching ""

    No results matching ""