Use the API to expand image resolution while maintaining the original image style and content consistency
API call cost
Each API call consumes 2 credits.
Request
- Method: POST
- URL:https://yimeta.ai/api/v1/ai-outpaint-generator
Request Header
Parameter |
Type |
Description |
authorization |
string |
|
Request Body
Parameter |
Type |
Required |
Description |
img_url |
string |
Required |
URL or file of the original image |
prompt |
string |
No |
The prompt used to describe the image content of the area you want to expand. |
negative_prompt |
string |
No |
The negative prompt used to describe the extended image content that you don't want to show |
top |
int |
Required |
The pixel values of the image extended to the top region. |
bottom |
int |
Required |
The pixel values of the image extended to the bottom region. |
left |
int |
Required |
The pixel values of the image extended to the left region. |
right |
int |
Required |
The pixel values of the image extended to the right region. |
blur |
int |
No (defalut value: 16) |
The degree of transition smoothness between the original content and the extended content. |
{
"img_url": "https://art-global.yimeta.ai/anime/19034d2379bbb740be458e428cffdced.webp",
"prompt": "",
"negative_prompt": "", // optional
"top": 0,
"bottom": 0,
"left": 100,
"right": 100,
"blur": 16, // optional
}
Respones
Response Body
Parameter |
Type |
Description |
status |
string |
API task status |
task_id |
string |
The unique ID of the task. |
result |
list |
result image |
Example
####successed
{
"stauts": "successed",
"task_id": "f12400e2-5546-4286-92e9-2263d2f5c3fd",
"result": ["https://art-global.yimeta.ai/workflow/aa4a777e2644f16372fd0cf4b5baffcb.webp"]
}
####over time
{
"status": "executing",
"task_id": "f12400e2-5546-4286-92e9-2263d2f5c3fd"
}
####failed
{
"status": "failed",
"error": "error message"
}