发起作画
POST
/avatar/artwork/create发起作画
请求参数
Body 参数application/json
avatar_key
string <string>
必需
训练所得的化身key
示例值:
666A1E42BB02FBA6E530269352FF086B
prompt
string <string>
可选
作画描述补充,500字符以内
Validate[max: 500; ]
示例值:
夜幕下的赛博朋克城市
artwork_templates
array[object (ArtworkTemplateParamRequest_request) {2}]
可选
作画所选模版
Validate[max: 5; ]
template_key
string <string>
资源模版key
示例值:
7795F4C854A4E053D314FA805C4EB742
number
integer <int32>
可选
模版作画数量, 默认:1,最大:10
示例值:
2
notify_url
string <string>
可选
回调url
回调重试规则:
- 支持5级重试时间: 5, 10, 30, 60, 120 (单位:秒),也就是分别会在5s、10s、30s...时进行回调重试
- 当回调通知方返回"success"时,我们会认为您已经成功处理回调,并终止重试
回调报文:
包含字段注释:{ "artwork_url":"https://cdn.wujiebantu.com/ai/530FFE6722D2A2B4A9504166221AAB40-01.jpg", "audit_info":{ "check_fail":false, "hit":false, "data_id":"245959", "total_suggestion":"PASS", "scan_scene_d_t_o_s":[ { "rate":0.9944, "suggestion":"pass", "label":"politics", "label_desc":"涉政", "scene":"TERRORISM" }, { "rate":1, "suggestion":"pass", "label":"terrorism", "label_desc":"暴恐", "scene":"TERRORISM" }, { "rate":0.9993, "suggestion":"pass", "label":"porn", "label_desc":"色情", "scene":"PORN" }, { "rate":1, "suggestion":"pass", "label":"prohibition", "label_desc":"违禁", "scene":"TERRORISM" }, { "rate":0.9986, "suggestion":"pass", "label":"sexy", "label_desc":"性感", "scene":"PORN" } ], "url":"https://cdn.wujiebantu.com/ai/810F1750EFF2EC416ED6682DFFCFBF2C-01.jpg-v800" }, "code":0, "complete_time":1681109462, "integral_cost":2, "integral_cost_message":"积分已扣除", "involve_yellow":0, "key":"EF8DF2DCF18D0D69F7F836A100C857AF", "success":true }
success - 作画是否成功
audit_info - 审核信息
code - 作画是否成功code,0=成功 1=失败
key - 对应作画任务的key
artwork_url - 作画生成结果图url
involve_yellow - 是否涉黄
complete_time - 作画完成时间
integral_cost - 积分花费
integral_cost_message - 积分花费说明
示例值:
www.bertha-gottlieb.io
示例
{
"avatar_key": "666A1E42BB02FBA6E530269352FF086B",
"prompt": "夜幕下的赛博朋克城市",
"artwork_templates": [
{
"template_key": "7795F4C854A4E053D314FA805C4EB742",
"number": 2
}
],
"notify_url": "www.bertha-gottlieb.io"
}
示例代码
返回响应
OK(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
string <string>
响应code
示例值:
200
message
string <string>
失败信息
示例值:
success
data
object (AvatarArtworkKeysVo_response)
可选
返回数据(object)
keys
array[string]
作画结果Key列表
示例值:
[3E46BF62A51256A96EEFB73079BD55E2, 66FB4071D5647F5F8CD702AC1910AA5D]
results
array[object (CrAvatarArtworkCreateResult_response) {3}]
可选
作画结果result列表
expected_integral_cost
integer <int32>
预计总消耗积分数
示例值:
2
示例test data
{
"code": "200",
"message": "success",
"data": {
"keys": [
"3E46BF62A51256A96EEFB73079BD55E2",
"66FB4071D5647F5F8CD702AC1910AA5D"
],
"results": [
{
"template_key": "7795F4C854A4E053D314FA805C4EB742",
"key": "C5B5FE8DBF3679D9049342C130341BD9",
"expected_second": 12
}
],
"expected_integral_cost": 2
}
}
最后修改时间: 5 个月前