AI Art Generation
Async API
Due to the long call time of this interface, AI art generation api consists of two interfaces: one for submitting tasks and one for querying results
Submit task API
Request
API url: https://www.cutout.pro/api/v1/text2imageAsync
Method: POST
Content-Type: application/json
Header paramters
- APIKEY:The user's API key, which is available in the user center
Body paramters:
{
prompt (string, required): The description you want to generate the image,
style (string, optional): The style of the image,
imageUrl (string, optional): The url of the input image,
width: (integer, optional): The width of the result image, between 128 and 2048, default value is 512, width*height must be less equal than 1920*1080
height: (integer, optional): The height of the result image, between 128 and 2048, default value is 512, width*height must be less equal than 1920*1080
}
Current supported style:
- "Sci-Fi"
- "Techpunk"
- "Photo"
- "Dystopia"
- "Fantasy"
- "Cyber"
- "Europa"
- "Ethereal"
- "Ghibli"
- "Vector Art"
- "Realistic Anime"
- "Concept Art"
- "West Coast"
- "Photorealistic"
- "Cute"
Response
{
"code": 0,
"data": 12345, //The task id returned
"msg": null,
"time": 1599644436677
}
Query result API
Request
API url: https://www.cutout.pro/api/v1/getText2imageResult Method: GET
Header paramters
- APIKEY:The user's API key, which is available in the user center
Query String parameters:
taskId
The returned task id of the submit request
Response
{
"code": 0,
"data": {
"id": 1234, // task id,
"percentage": 65, //percentage of the task
"status": 1, // 0:processing,1:success,2:failed,3:waiting
"resultUrl": "https://xxxx" //if the status is 1, this will be the temp url of the result image
}
"msg": null,
"time": 1599644436677
}
Price
resolution of width*height | price |
---|---|
Less equal than 512x512 | Each successful API call costs 3 credits |
Between 512x512(exclude) and 1024x1024(include) | Each successful API call costs 6 credits |
Between 1024x1024(exclude) and 1920x1080(include) | Each successful API call costs 12 credits |