API中心
  1. 身份证服务
API中心
  • 身份证服务
    • 生成身份证照片
      POST
  • 姓名解析服务
    • 姓名解析
      POST
  • Runway任务管理
    • 发起新任务
      POST
    • 获取任务信息
      GET
  • 用户管理
    • 用户注册
      POST
  1. 身份证服务

生成身份证照片

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 '{
    "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
}'

返回响应

🟢200成功
*/*
OK
Body
接口调用返回结果
code
integer <int32>
必需
返回结果状态码,0为成功,非0为失败
示例值:
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记录不存在
下一页
姓名解析
Built with