Edit
Edit image - Fill
Async function -> response in notification 'edit_fill'
Example:
import requests
import json
url_api = 'https://api.piktid.com/api'
mask_full_path = 'local_path_of_your_mask_image'
id_image = 'target_image_identifier' # provided by /edit/target
prompt = 'a woman wearing a black dark dress'
options = {}
response = requests.post(url_api+'/edit/fill',
headers={'Authorization': 'Bearer '+TOKEN},
files={
'mask': open(mask_full_path, 'rb')
},
data={'id_image':id_image, 'prompt':prompt, 'options':json.dumps(options)},
)
response_json = json.loads(response.text)
links = response_json.get('links')
image_name = response_json.get('image_name')AuthorizationBearer <token>
In: header
mask?string
id_image?string
prompt?string
options?string
Response Body
Examples
curl -X POST "https://api.piktid.com/api/edit/fill"{
"links": [
{
"l": "string",
"n": "string",
"t": "string"
}
],
"id_image": "string"
}{
"code": 0,
"message": "string",
"description": "string"
}{
"code": 0,
"message": "string",
"description": "string"
}{
"code": 0,
"message": "string",
"description": "string"
}