Easily create an image from scratch with our AI image generator by entering descriptive text.
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Parameter | Type | Value | Description |
---|---|---|---|
prompt | String | Describe the information needed to generate the image | |
scale | String | ”1:1” “4:3” “3:4” “16:9” “9:16” “3:2” “2:3” | The size of the generated image default: “1:1” |
source_image | String | Need to generate the original image link of the image 【If you want to perform imageToImage operation you can pass in this parameter】 | |
webhookUrl | String | Callback url address based on HTTP request |
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000:success) |
msg | String | Interface returns status information | |
data | Object | { _id: "", image_status: 1 } | _id: Interface returns data, image_status: the status of image: 【1:queueing, 2:processing, 3:completed, 4:failed】 |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Parameter | Type | Value | Description |
---|---|---|---|
_id | String | the image_id you had generated, you can got it from https://openapi.akool.com/api/open/v3/content/image/createbyprompt | |
button | String | the type of operation you want to perform, You can get the field(display_buttons) value from https://openapi.akool.com/api/open/v3/content/image/infobymodelid【U(1-4): Generate a single 4k image based on the corresponding serial number original image, V(1-4):Generate a single variant image based on the corresponding serial number original image】 | |
webhookUrl | String | Callback url address based on HTTP request |
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000:success) |
msg | String | Interface returns status information | |
data | Object | {_id:"",image_content_model_id: "",op_button: "",image_status:1} | _id : Interface returns data image_content_model_id: the origin image _id you had generated op_button: the type of operation you want to perform image_status: the status of image: 【1:queueing, 2:processing, 3:completed, 4:failed】 |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Parameter | Type | Value | Description |
---|---|---|---|
image_model_id | String | image db id:You can get it based on the _id field returned by https://openapi.akool.com/api/open/v3/content/image/createbyprompt or https://openapi.akool.com/api/open/v3/content/image/createbybutton api. |
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000:success) |
msg | String | Interface returns status information | |
data | Object | {image_status:1,_id:"",image:""} | image_status: the status of image: 【1:queueing, 2:processing, 3:completed, 4:failed】 image: Image result after processing _id: Interface returns data |
Parameter | Value | Description |
---|---|---|
code | 1000 | Success |
code | 1003 | Parameter error or Parameter can not be empty |
code | 1008 | The content you get does not exist |
code | 1009 | You do not have permission to operate |
code | 1010 | You can not operate this content |
code | 1101 | Invalid authorization or The request token has expired |
code | 1102 | Authorization cannot be empty |
code | 1108 | image generate error,please try again later |
code | 1200 | The account has been banned |