Documentation Index Fetch the complete documentation index at: https://docs.akool.com/llms.txt
Use this file to discover all available pages before exploring further.
The resources (image, video, voice) generated by our API are valid for 7 days.
Please save the relevant resources as soon as possible to prevent expiration.
Endpoint
POST https://openapi.akool.com/api/open/v3/content/image/createbybutton
Parameter Value Description x-api-key API Key Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded. Authorization Bearer {token} Your API Key used for request authorization.Get Token
Body Attributes
Parameter Type Required Description _id String true The image _id you had generated, from the Create By Prompt API response button String true The type of operation to perform. Get available values from the buttons field in Get Image Result API response. U1-U4: Generate a single 4K image based on the corresponding image. V1-V4: Generate a single variant based on the corresponding image webhookUrl String false Callback URL address based on HTTP request
Response Attributes
Parameter Type Description code Integer Interface returns business status code (1000:success) msg String Interface returns status information data Object Response data object - _id String Document ID for the new image - image_content_model_id String The original image _id from the source generation - create_time Long Creation timestamp - op_button String The operation button used - op_buttonMessageId String Operation message ID - image_status Integer Status: 1=queueing, 2=processing, 3=completed, 4=failed - deduction_credit Integer Credits deducted - from Integer Source identifier - buttons Array Available operation buttons - used_buttons Array Already used buttons - upscaled_urls Array Upscaled image URLs
Example
Request Body
{
"_id" : "65d3206b83ccf5ab7d46cdc6" ,
"button" : "U2" ,
"webhookUrl" : ""
}
Request
cURL
Java
Javascript
PHP
Python
curl --location 'https://openapi.akool.com/api/open/v3/content/image/createbybutton' \
--header 'x-api-key: {{API Key}}' \
--header 'Content-Type: application/json' \
--data '{
"_id": "65d3206b83ccf5ab7d46cdc6",
"button": "U2",
"webhookUrl": ""
}'
Response
{
"code" : 1000 ,
"msg" : "OK" ,
"data" : {
"faceswap_quality" : 2 ,
"deduction_credit" : 2 ,
"buttons" : [],
"used_buttons" : [],
"upscaled_urls" : [],
"_id" : "6508292f16e5ba407d47d21b" ,
"image_content_model_id" : "6508288416e5ba407d47d13f" ,
"create_time" : 1695033647012 ,
"op_button" : "U2" ,
"op_buttonMessageId" : "kwZsk6elltno5Nt37VLj" ,
"image_status" : 1 ,
"from" : 1
}
}
Button Description U1 Generate a single 4K image based on image #1 U2 Generate a single 4K image based on image #2 U3 Generate a single 4K image based on image #3 U4 Generate a single 4K image based on image #4 V1 Generate a single variant based on image #1 V2 Generate a single variant based on image #2 V3 Generate a single variant based on image #3 V4 Generate a single variant based on image #4
Important Notes
The _id must be from a previously generated image via the Create By Prompt API
Check available buttons from the buttons field in the Get Image Result API response before performing an operation
Once a button is used, it will move from buttons to used_buttons and cannot be used again
Resource Expiration : Generated images are valid for 7 days, save them promptly
Webhook : Use webhookUrl to receive notifications when image generation is complete
Save the new _id from the response to check image status using the Get Image Result API