Fotor OpenAPI
  1. Reference
Fotor OpenAPI
  • Getting Started
    • Introduction
    • Access and Authentication
    • For Serverless Clients
    • Token Consumption
  • Reference
    • AI Upscaler
      POST
    • AI Skin Retouch
      POST
    • Text to Image
      POST
    • Image to Image (AI Art Effects)
      POST
    • Background Remover
      POST
    • AI Headshot
      POST
    • Photo Colorize
      POST
    • Photo Restoration
      POST
    • Face Swap
      POST
    • AI Replace
      POST
    • AI Expand
      POST
    • Query Task Details
      GET
  • Webhook
    • Webhook
  • AI Editor SDK
    • Getting Started
    • Get Sdk Temporary Token
      GET
  1. Reference

AI Expand

POST
/v1/aiart/extender
Al Expand
Expand your photo with one click using Fotor's advanced Al algorithm to extend subjects, backgrounds, and textures naturally.

Request

Header Params
Authorization
string 
required
Example:
Bearer <your api key>
Body Params application/json
imageUrl
string 
required
The URL or BASE64 encoded image of the initial image provided by the user, used to generate a new image based on it.
padImgLeft
integer 
required
Pixels expanded to the left
padImgTop
integer 
required
Pixels expanded to the top
padImgRight
integer 
required
Pixels expanded to the right
padImgBottom
integer 
required
Pixels expanded to the bottom
Example
{
    "imageUrl": "https://pub-static.fotor.com/assets/goart-effects/examples/mini-figure-after.jpg",
    "padImgLeft": 100,
    "padImgTop": 100,
    "padImgRight": 100,
    "padImgBottom": 100
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-b.fotor.com/v1/aiart/extender' \
--header 'Authorization: Bearer <your api key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "imageUrl": "https://pub-static.fotor.com/assets/goart-effects/examples/mini-figure-after.jpg",
    "padImgLeft": 100,
    "padImgTop": 100,
    "padImgRight": 100,
    "padImgBottom": 100
}'

Responses

🟢200success
application/json
Body
code
string 
required
000: Success,999: Unknown error
Example:
000
msg
string 
required
Example:
success
data
object 
required
taskId
string 
required
Task ID, used to query task information.
Example:
e0dc194703174b6eafeacb4ee8e02850
Example
{
    "code": "000",
    "msg": "success",
    "data": {
        "taskId": "e0dc194703174b6eafeacb4ee8e02850"
    }
}
Modified at 2025-06-17 09:15:03
Previous
AI Replace
Next
Query Task Details
Built with