生成身份证照片
POST
/uniapp-service/api/idcard/addBg
身份证服务
请求参数
Header 参数
Authorization
string
可选
默认值:
sk-12345678abcdefg
Body 参数application/json
base64
string
必需
bgColor
string
可选
dpi
integer <int32>
可选
faceAlignment
boolean
可选
faceDetectModel
string
可选
hd
boolean
可选
headHeightRatio
number <float>
可选
headMeasureRatio
number <float>
可选
humanMattingModel
string
可选
kb
integer <int32>
可选
render
integer <int32>
可选
resize
integer <int32>
可选
targetHeight
integer <int32>
可选
targetWidth
integer <int32>
可选
topDistanceMax
number <float>
可选
topDistanceMin
number <float>
可选
示例
{
"base64": "string",
"bgColor": "string",
"dpi": 0,
"faceAlignment": true,
"faceDetectModel": "string",
"hd": true,
"headHeightRatio": 0,
"headMeasureRatio": 0,
"humanMattingModel": "string",
"kb": 0,
"render": 0,
"resize": 0,
"targetHeight": 0,
"targetWidth": 0,
"topDistanceMax": 0,
"topDistanceMin": 0
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.qimuinfo.top/uniapp-service/api/idcard/addBg' \
--header 'Authorization: sk-12345678abcdefg' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
*/*
Body
接口调用返回结果
code
integer <int32>
必需
示例值:
0
message
string
返回结果说明信息
示例值:
执行成功
result
object (IDCardVO)
返回结果数据
data
string
可选
imageBytes
string <byte>
可选
success
boolean
是否成功标志
示例值:
true
timestamp
integer <int64>
返回的时间戳
示例
{
"code": 0,
"message": "执行成功",
"result": {
"data": "string",
"imageBytes": "string"
},
"success": true,
"timestamp": 0
}
🟢201成功
🟠401没有权限
🟠403禁止访问
🟠404记录不存在
修改于 2024-12-07 12:01:36