Swap

Consistent identity - Upload target image

Deprecation notice

This endpoint is deprecated. We recommend using alternative endpoints to ensure continued support and compatibility.

Reserved for premium users

Example:


import requests
import json

url_api = 'https://api.piktid.com/api'
target_full_path = 'url_of_your_target_image'
options = {}

response = requests.post(url_api+'/swap/target',
headers={'Authorization': 'Bearer '+TOKEN},
files={'target': open(target_full_path, 'rb')},
data={'options':json.dumps(options)},
)

target_name = response_json = json.loads(response.text).get('target_name')
POST
/api/swap/target
AuthorizationBearer <token>

In: header

target?string
options?string
flag_hair?boolean

Response Body

Examples

curl -X POST "https://api.piktid.com/api/swap/target" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "target_name": "string"
}
{
  "code": 0,
  "message": "string",
  "description": "string"
}
{
  "code": 0,
  "message": "string",
  "description": "string"
}
{
  "code": 0,
  "message": "string",
  "description": "string"
}