Consistentidentities

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
AuthorizationBearer <token>

In: header

file?string
url?string
identity_name?string

Response Body

Examples

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