ExpandGenerate
Expand - Generate variation
Async function -> response in notification 'expand' Example:
import requests
import json
url_api = 'https://api.piktid.com/api'
id_image = 'target_image_code' # provided by /expand/target
prompt = 'a nice background'
left = 0
right = 0
top = 200
bottom = 0
options = {}
response = requests.post(url_api+'/expand/generate',
headers={'Authorization': 'Bearer '+TOKEN},
data={'target_name':target_name, 'prompt':prompt, 'left':left, 'right':right, 'top':top, 'bottom':bottom, 'options':json.dumps(options)},
)
response_json = json.loads(response.text)
links = response_json.get('links')Authorization
token_auth_2 AuthorizationBearer <token>
In: header
Request Body
application/json
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/expand/generate" \ -H "Content-Type: application/json" \ -d '{}'{
"links": [
{
"l": "string",
"n": "string",
"t": "string"
}
]
}{
"code": 0,
"message": "string",
"description": "string"
}{
"code": 0,
"message": "string",
"description": "string"
}{
"code": 0,
"message": "string",
"description": "string"
}