接口地址:https://api.zjzapi.com/ai-photo/make
请求方式:POST(application/x-www-form-urlencoded)
返回格式:json
接口费用:1-5分钟生成完成,返回成功扣除0.08元
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
key | 是 | string | 应用的key |
template_id | 是 | string | 模版id《查看模板列表》 |
images[] | 是 | array | base64后的图片内容,1-4张人像图片。 |
notice_url | 是 | string | 回调地址 |
名称 | 类型 | 说明 |
---|---|---|
code | int | 状态码(0=成功,-1=错误) |
msg | string | 错误提示 |
data | array | 数据集 |
{ "data": { "estimated_time": 30, # 等待时间30秒 "pic_id": 558731820 }, "code": 0, "msg": "提交成功" }
生产完成后会以post方式向商家“回调地址(notice_url)”发送通知。
名称 | 固定字段 | 类型 | 说明 |
---|---|---|---|
image | 是 | string | 生成的图片地址 |
pic_id | 是 | int | 生成记录id |
sign | 是 | string | 当前应用的“apikey”md5后的结果,用此字段校验数据安全 |
接口地址:https://api.zjzapi.com/ai-photo/templates
请求方式:POST(application/x-www-form-urlencoded)
返回格式:json
接口费用:免费
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
key | 是 | string | 应用的key |
名称 | 类型 | 说明 |
---|---|---|
code | int | 状态码(0=成功,-1=错误) |
msg | string | 错误提示 |
data | array | 数据集 |
{ "data": { "list": [ { "name": "黑装御影", "template_id": "9a9fbed1-b6fc-440d-84c5-9c05701b7673", "image_url": "https://storage.zheyings.com/ai-photo/template/g1_300.jpg", "category_id": "2", # 分类id,1=风格写真,2=形象照,3=证件照,4=卡通动漫,5=素描风 "gender": "2", # 性别,1=男,2=女 }, ] }, "code": 0, "msg": "提交成功" }