EditFill

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')
POST
/api/edit/fill

Authorization

token_auth_2
AuthorizationBearer <token>

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

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