Skip to content

V2.0

AI Image Extender API allows you to extend the dimensions of an image by generating new content around it (Outpainting).

Run an AI Image Extender task.

Request

Please refer to the polling guide for checking task status. The API takes 3 key parameters: input image, pivot point, and output image.

Security
BearerAuthenticationV2
Bodyapplication/jsonrequired
Any of:

The AI Image Extender API takes 3 key parameters to work, an input image, a pivot point and an output image. The size of output image should always be larger than the size of input image.

output_widthinteger, [ 1 .. 4096 ]required

Output image width. value range: [1 - 4096]

Example:960
output_heightinteger, [ 1 .. 4096 ]required

Output image height. value range: [1 - 4096]

Example:1280
input_xinteger, [ 0 .. 4096 ]required

Source image left position in output image, where The indices are ordered from top to bottom, and from left to right. value range: [0 - 4096]

Example:240
input_yinteger, [ 0 .. 4096 ]required

Source image top position in output image, where The indices are ordered from top to bottom, and from left to right. value range: [0 - 4096]

Example:320
input_widthinteger, [ 1 .. 4096 ]required

Source image width, input_x + input_width must <= output_width. value range: [1 - 4096]

Example:480
input_heightinteger, [ 1 .. 4096 ]required

Source image height, input_y + input_height must <= output_height. value range: [1 - 4096]

Example:640
crop_input_xinteger, [ 0 .. 4096 ]required

Crop source image from x, where The indices are ordered from top to bottom, and from left to right. value range: [0 - 4096]

Example:0
crop_input_yinteger, [ 0 .. 4096 ]required

Crop source image from y, where The indices are ordered from top to bottom, and from left to right. value range: [0 - 4096]

Example:0
crop_input_widthinteger, [ 1 .. 4096 ]required

Crop source image with width crop_input_width. value range: [1 - 4096]

Example:480
crop_input_heightinteger, [ 1 .. 4096 ]required

Crop source image with height crop_input_height. value range: [1 - 4096]

Example:640
src_file_urlstringrequired

Url of the file to run task. The url should be publicly accessible.

Example:"https://example.com/selfie.jpg"
POST
/s2s/v2.0/task/out-paint
curl -i -X POST \
  https://yce-api-01.makeupar.com/s2s/v2.0/task/out-paint \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "src_file_url": "https://example.com/selfie.jpg",
    "output_width": 960,
    "output_height": 1280,
    "input_x": 240,
    "input_y": 320,
    "input_width": 480,
    "input_height": 640,
    "crop_input_x": 0,
    "crop_input_y": 0,
    "crop_input_width": 480,
    "crop_input_height": 640
  }'

Responses

Successful execution of the task

Bodyapplication/json
statusinteger

Response status

Example:200
dataobject
Response
{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }