Consistentidentities

Step 1) Uploading a target image

The uploaded target image expires after 24 hours.

import requests

api_url = "https://api.piktid.com/api"
access_token = "your_access_token"
target_path = "path_to_image"
options = {
"flag_hair": True,
}

with open(target_path, "rb") as target:
response = requests.post(
api_url + "/consistent_identities/upload_target",
headers={"Authorization": "Bearer " + access_token},
data={"options": json.dumps(options)},
files={
"file": target
},
).json()
image_id = response.get("image_id")
print("Created image ID: ", image_id)
POST
/api/consistent_identities/upload_target
AuthorizationBearer <token>

In: header

file?string
url?string
options?string

Response Body

Examples

curl -X POST "https://api.piktid.com/api/consistent_identities/upload_target"
{
  "image_id": "string",
  "faces": [
    "string"
  ],
  "coordinates_list": [
    "string"
  ],
  "thumbnails": [
    "string"
  ],
  "blurred_faces_list": [
    "string"
  ],
  "face_description_list": [
    "string"
  ]
}
{
  "code": 0,
  "message": "string",
  "description": "string"
}
{
  "code": 0,
  "message": "string",
  "description": "string"
}
{
  "code": 0,
  "message": "string",
  "description": "string"
}