Consistent_identitiesUpload_face

Step 2) Upload a face/identity

Upload a face/identity to be used as reference for the consistent identity generation.

Example:


import requests

api_url = "https://api.piktid.com/api"
access_token = "your_access_token"
face_path = "path_to_face_image"

with open(face_path, "rb") as face:
response = requests.post(
api_url + "/consistent_identities/upload_face",
headers={"Authorization": "Bearer " + access_token},
files={
"file": face,
},
).json()
face_id = response.get("identity_name")
print(face_id)
POST
/api/consistent_identities/upload_face

Authorization

token_auth_2
AuthorizationBearer <token>

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.piktid.com/api/consistent_identities/upload_face"
{
  "identity_name": "string"
}
{
  "code": 0,
  "message": "string",
  "description": "string"
}
{
  "code": 0,
  "message": "string",
  "description": "string"
}
{
  "code": 0,
  "message": "string",
  "description": "string"
}