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
    • Query Task Details
      GET
  • Webhook
    • Webhook
  • AI Editor SDK
    • Getting Started
    • Get Sdk Temporary Token
      GET
  1. Reference

AI Upscaler

POST
/v1/aiart/imgupscale
AI Upscaler

Request

Header Params
Authorization
string 
required

Here, <your_api_key> is the API key you obtained from the Fotor Developer Platform.

Example:
Bearer <your api key>
Body Params application/json
upscaling_resize
integer 
required
Upscaling factor.
userImageUrl
string 
required
The URL of the user's image or the image in BASE64 encoded format, used to provide the face to be replaced in the template image.
max_image_width
integer 
required
The maximum pixel width of the image after upscaling.
max_image_height
integer 
required
The maximum pixel height of the image after upscaling.
Example
{
  "upscaling_resize": 2,
  "userImageUrl": "https://pub-static.fotor.com/assets/goart-effects/examples/mini-figure-after.jpg",
  "max_image_width": 2048,
  "max_image_height": 2048
}

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/imgupscale' \
--header 'Authorization: Bearer <your api key>' \
--header 'Content-Type: application/json' \
--data-raw '{
        "upscaling_resize": 2.0,
        "userImageUrl": "https://pub-static.fotor.com/assets/goart-effects/examples/mini-figure-after.jpg",
        "max_image_width": 2048,
        "max_image_height": 2048
}'

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-03-14 02:44:26
Previous
Token Consumption
Next
AI Skin Retouch
Built with