Skip to content

Face Data Management

Basics

  • Base URL: https://api.ticos.cn
  • Auth: Authorization: Bearer <token>

Endpoint overview

  • POST /faces: create a face record
  • GET /faces: list faces
  • POST /faces/{face_id}: create/replace by face_id
  • GET /faces/{face_id}: get face details
  • PUT /faces/{face_id}: update face metadata
  • DELETE /faces/{face_id}: delete a face

Request fields

  • face_id: unique face identifier
  • name: display name
  • image_base64: Base64 image payload (data:image/jpeg;base64,...)

Example: create

curl --location 'https://api.ticos.cn/faces' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
"face_id": "1",
"name": "william",
"image_base64": "data:image/jpeg;base64,XXXXXX"
}'

Example: list

curl --location 'https://api.ticos.cn/faces' \
--header 'Authorization: Bearer <API_KEY>'

Example: update name

curl --location --request PUT 'https://api.ticos.cn/faces/1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{"name":"huyiyang"}'

Example: delete

curl --location --request DELETE 'https://api.ticos.cn/faces/1' \
--header 'Authorization: Bearer <API_KEY>'

Common status codes

  • 200 OK: success
  • 400 Bad Request: invalid params / malformed JSON
  • 401 Unauthorized: authentication failed