EditFill
Edit image - Fill
POST
Async function -> response in notification 'edit_fill'
Example:
import requestsimport jsonurl_api = 'https://api.piktid.com/api'mask_full_path = 'local_path_of_your_mask_image'id_image = 'target_image_identifier' # provided by /edit/targetprompt = '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')token_auth_2header
AuthorizationBearer <token>multipart/form-data- body
mask?unknownid_image?stringprompt?stringoptions?stringSuccess
application/json- response
links?array<>id_image?stringcurl -X POST "https://example.com/api/edit/fill"{ "links": [ { "l": "string", "n": "string", "t": "string" } ], "id_image": "string"}