Access Documentation
FaceSearch
API Documentation
Create Face Library
Create Face Library

# Description

Create a collection of face libraries, with a maximum support of establishing 10 face libraries and a total maximum face count of 5 million.

# Request URL:

https://api-sgp.yljz.com/finauth/search/group/create

Note: In production environments, please use HTTPS for communication. HTTP communication is considered insecure and poses security risks; therefore, it should not be used in production environments. Services using HTTP in production will not receive reliability guarantees.

# Calling Method

POST Note: Use form-data format for the request

# Request Parameters

Parameter Type Description
Required
sign
String The client signature for calling this API. For how to generate the signature, see App - Authentication Guide.
Required sign_version String Signature algorithm version. Pass: hmac_sha1
Required group_name
String
Name of the face library to create. Cannot be an empty string; 1-60 characters.
Required group_id
String Face library ID. Cannot be modified; must be unique. Supports letters, digits, -%@#&_ . Length limit: 48B. Example: YuanliStudent_01
Optional group_data String Face library information; no more than 128 characters.
Optional model_version String Model version. The algorithm model version used by the face recognition service. Default: "s21"

# Response Fields

Field Path Type Description
request_id String A unique string to distinguish each request. It can be used for subsequent data lookup. This field is always returned.
model_version String Algorithm model version used for face recognition. Example: s21
group_id
String
Unique identifier of the user-defined face library. Empty if not defined.
group_name String Face library name.
group_data String Face library information.
error
String
Returned only when an error occurs. See the error section below for details. Otherwise this field does not exist.
time_used
Int
Total time consumed by the request in milliseconds. This field is always returned unless a 404 (API_NOT_FOUND) or 403 (AUTHORIZATION_ERROR) occurs.

Example: success response

{
    "request_id": "1769683520,2e83e40d-9402-4a18-a1ed-bacd617865b2",
    "time_used": 127,
    "group_id": "YuanliStudent_01",
    "group_name": "InternLibrary_01",
    "group_data": "Intern face library for storing face information",
    "model_version": "s21"
}

Example: error response

{
    "request_id": "1769684042,e043ea9c-92c9-4c1e-8af4-8198da8ac6c1",
    "time_used": 17,
    "error": "GROUP_EXIST"
}

# error_message Errors

ERROR_MESSAGE specific to this API

HTTP Status Code Error Description
400 GROUP_EXIST The face library you want to create already exists.
400 GROUP_EXCEEDED The number of face libraries has reached the upper limit and cannot be increased. Up to 10 libraries can be created.