鹧应证件照API是一款可以精准人像抠图,裁剪,换底,美颜,换装,图像增强,照片排版,图片编辑等技术,具有超高的算法,合规性检测API接口,性价比超高,制作标准证件照。
接口名称
证件照换装api
证件照换装接口是一种提供自动更换证件照中人物服装的功能的接口。它通常基于图像处理和人工智能技术,能够识别证件照中的人物,并将其服装替换为指定的模板服装。
使用场景
该接口适用于更换证件照服装场景,如证件照在线制作,各类证件照片服装。
换装服饰
支持多套服装进行替换,包含不同风格、不同颜色、不同尺码等不同选择。
支持自适应多种人体姿势,通过服装区域的位置和大小,自动调整叠加位置和大小,保证更换后的服装效果更加自然。
男装
女装
童装
调用流程
1、注册账号
API网址:https://www.zjzapi.com/
注册API账号:登录账号在用户中心–应用管理–添加应用,获取证件照apikey
2、API文档
对接API文档:https://zjzapi.com/doc/v5.html
2.1证件照检测+制作
接口地址:https://api.zheyings.cn/idcardv5/make
请求方式:POST(application/x-www-form-urlencoded)
返回格式:json
接口费用:调用免费,可使用接口返回的"pic_id"获取无水印证件照
请求参数:
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
key | 是 | string | 应用的key |
item_id | 是 | int | 规格id,《查看规格列表》 |
image | 是 | string | base64后的图片内容 |
colors | 否 | string | 颜色名称,支持:blue、white、red、tint、grey、gradient、dark_blue,不填写返回所有底色 |
enhance | 否 | int | 人像增强,默认已支持,不需要可传参数0 |
beauty | 否 | int | 美颜,默认已支持,不需要可传参数0 |
返回参数:
名称 | 类型 | 说明 |
---|---|---|
code | int | 状态码 |
msg | string | 返回说明 |
data | array | 数据集 |
JSON返回示例:
{
"data": {
"pic_id": "9244614",
"list": {
"white": "http://demo.com/pic/20200511/913191c8906ce81a2107d6ff5157c014/white.jpg"
}
},
"code": 0,
"msg": "success"
}
2.2证件照换装
接口地址:https://api.zheyings.cn/idcardv5/clothes
请求方式:POST(application/x-www-form-urlencoded)
返回格式:json
接口费用:调用免费,可使用接口返回的"pic_id"获取无水印证件照;更换底色、自定义制作现已支持换装。
请求参数:
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
key | 是 | string | 应用的key |
pic_id | 是 | string | 制作接口返回的“pic_id” |
color | 是 | string | 颜色名称 |
clothes | 是 | string | 服装key,《查看服装列表》 |
返回参数:
名称 | 类型 | 说明 |
---|---|---|
code | int | 状态码 |
msg | string | 返回说明 |
data | array | 数据集 |
JSON返回示例:
{
"data": {
"pic_id": "9244614",
"pic": "http://demo.com/pic/20200511/913191c8906ce81a2107d6ff5157c014/white.jpg",
"clothes_key": "blue-child_09"
},
"code": 0,
"msg": "success"
}
2.3获取证件照
接口地址:https://api.zheyings.cn/idcardv5/get
请求方式:POST(application/x-www-form-urlencoded)
返回格式:json
接口费用:获取成功扣除0.6元,重复获取不扣费。
请求参数:
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
key | 是 | string | 应用的key |
pic_id | 是 | string | 制作接口返回的pic_id,有效期50分钟 |
clothes_key | 否 | string | 换装接口返回的clothes_key,有效期50分钟 |
返回参数:
名称 | 类型 | 说明 |
---|---|---|
code | int | 状态码 |
msg | string | 返回说明 |
data | array | 数据集 |
JSON返回示例:
{
"data": {
"white": "http://demo.com/pic/20200511/913191c8906ce81a2107d6ff5157c014/white.jpg"
},
"code": 0,
"msg": "success"
}