发起作画
POST
/avatar/camera/create发起作画
请求参数
Body 参数application/json
avatar_key
string <string>
化身key
示例值:
C5B5FE8DBF3679D9049342C130341BD9
camera_artwork_advanced
object (CameraArtworkAdvancedRequest_request)
可选
高级参数(object)
first_diffusion_steps
integer <int32>
可选
第一次扩散模型推理步数,默认50
取值范围[15,50]
示例值:
50
first_denoising_strength
number <float>
可选
第一次推理强度,默认0.45
取值范围[0.3,0.5]
示例值:
0.45
second_diffusion_steps
integer <int32>
可选
第二次扩散模型推理步数,默认50
取值范围[15,50]
示例值:
20
second_denoising_strength
number <float>
可选
第二次推理强度,默认0.35
取值范围[0.3,0.4]
示例值:
0.3
crop_face_preprocess
boolean
可选
是否裁切人脸,默认: true
true:是
false:否
示例值:
true
before_face_fusion_ratio
number <float>
可选
推理前人脸融合强度,默认0.5
取值范围[0.2,0.8]
示例值:
0.5
after_face_fusion_ratio
number <float>
可选
推理后人脸融合强度,默认0.5
取值范围[0.2,0.8]
示例值:
0.5
apply_face_fusion_before
boolean
可选
推理前是否启用人脸融合,默认: true
true:启用
false:不启用
示例值:
true
apply_face_fusion_after
boolean
可选
推理后是否启用人脸融合,默认: true
true:启用
false:不启用
示例值:
true
color_shift_middle
boolean
可选
对第一次推理是否修复颜色偏移,默认: true
true:是
false:否
示例值:
true
color_shift_last
boolean
可选
对第二次推理是否修复颜色偏移,默认: true
true:是
false:否
示例值:
true
super_resolution
boolean
可选
是否启用肖像增强,默认: true
true:启用
false:不启用
示例值:
true
background_restore
boolean
可选
是否保存背景,默认: true
true:保存
false:不保存
示例值:
true
template_create_param
object (CameraTemplateCreateVO_request)
可选
模版参数(object)
template_key
string <string>
可选
模版key,可通过'个性相机高阶版作画模版(/avatar/camera/template_options)'接口获取。
示例值:
C5B5FE8DBF3679D9049342C130341BD9
template_url
string <string>
可选
自定义模版url, high priority
模版key(templateKey)和自定义模版url(templateUrl)二选一
示例值:
www.bertha-gottlieb.io
count
integer <int32>
可选
模版作画数量,默认1张,上限100张
示例值:
2
示例
{
"avatar_key": "C5B5FE8DBF3679D9049342C130341BD9",
"camera_artwork_advanced": {
"first_diffusion_steps": 50,
"first_denoising_strength": 0.45,
"second_diffusion_steps": 20,
"second_denoising_strength": 0.3,
"crop_face_preprocess": true,
"before_face_fusion_ratio": 0.5,
"after_face_fusion_ratio": 0.5,
"apply_face_fusion_before": true,
"apply_face_fusion_after": true,
"color_shift_middle": true,
"color_shift_last": true,
"super_resolution": true,
"background_restore": true
},
"template_create_param": {
"template_key": "C5B5FE8DBF3679D9049342C130341BD9",
"template_url": "www.bertha-gottlieb.io",
"count": 2
}
}
示例代码
返回响应
OK(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
string <string>
响应code
示例值:
200
message
string <string>
失败信息
示例值:
success
data
object (CameraArtworkKeysVo_response)
可选
返回数据(object)
keys
array[string]
作画结果Key列表
示例值:
[3E46BF62A51256A96EEFB73079BD55E2, 66FB4071D5647F5F8CD702AC1910AA5D]
expected_duration_cost
integer <int32>
可选
预计总消耗时长数,以实际消耗为准,单位: second
示例值:
20
expected_point_cost
integer <int32>
可选
预计积分消耗数,以实际消耗为准
示例值:
20
示例test data
{
"code": "200",
"message": "success",
"data": {
"keys": [
"3E46BF62A51256A96EEFB73079BD55E2",
"66FB4071D5647F5F8CD702AC1910AA5D"
],
"expected_duration_cost": 20,
"expected_point_cost": 20
}
}
最后修改时间: 6 个月前