Img Open English
  1. image tool
Img Open English
  • AI image generation
    • sd text2image
      POST
    • sd Image to Image
      POST
    • sd controlnet
      POST
    • QueryModelList
      POST
    • QueryLoralList
      POST
    • QueryVaeList
      POST
    • queryEmbeddingList
      POST
  • task query
    • queryTaskInfoV1.0
      POST
    • queryTaskInfoV2.0
      POST
    • queryImageToolTaskInfo
      POST
  • train model
    • Submit training task
    • Training result query
  • image tool
    • Flux text2image
      POST
    • Single Face Swap V1.0
      POST
    • Single Face Swap V2.0
      POST
    • instantID
      POST
    • Face restoration
      POST
    • Super Resolution
      POST
    • image description
      POST
    • Multiple Face Swap
      POST
    • Face Detection
      POST
    • Prompt expansion
      POST
    • Hairstyle changer
      POST
    • Object Removal
      POST
    • Style recognition
      POST
    • Outpainting
      POST
    • CNT preview
      POST
    • background remove
      POST
    • image enlarge
      POST
    • image watermark
      POST
  1. image tool

Super Resolution

POST
/AIGCImgOpenServ/saas/tool/enhance
Super-resolution processing of images; anti-parameter is asynchronous interface response~

Request

Header Params
X-Request-req-accessKeyId
string 
optional
X-Request-req-accessKeySecret
string 
optional
Body Params application/json
businessTaskId
string 
Task ID
required
image
string 
required
The URL of the image to be processed; the image length and width must be less than or equal to 1536, that is, the maximum image size is 1536*1536
resizeMode
integer 
optional
0: Use upscaling_resize to specify the enlarged size; 1: Use upscaling_resize_h x upscaling_resize_w to specify the enlarged size
gfpganVisibility
number 
optional
[0, 1]
codeformerVisibility
number 
optional
[0, 1]
codeformerWeight
number 
optional
[0, 1]
upscalingResize
integer 
Amplification factor
optional
[1, 8] Used when resize_mode is 0
upscalingResizeW
integer 
target width
optional
[64, 2048] Used when resize_mode is 1
upscalingResizeH
integer 
target height
optional
[64, 2048] Used when resize_mode is 1
upscalingCrop
boolean 
Crop
optional
Whether to crop the image to fit the set picture dimensions
upscaler1
string 
Main amplifier name
optional
None|Lanczos|Nearest|ESRGAN_4x|R-ESRGAN 4x+|R-ESRGAN 4x+ Anime6B|ScuNET PSNR
upscaler2
string 
Secondary amplifier name
optional
None|Lanczos|Nearest|ESRGAN_4x|R-ESRGAN 4x+|R-ESRGAN 4x+ Anime6B|ScuNET PSNR
extrasUpscaler2Visibility
number 
Secondary amplifier visibility
optional
[0, 1]
upscaleFirst
boolean 
HD restoration priority
optional
showExtrasResults
boolean 
optional
callbackUrl
string 
callback address
optional
Some of the interfaces used to return drawing results from the server are asynchronous interfaces. Please check the remarks. Only when the json string code = 200 received in the response will we mark the request as successful, such as {"code":"200"} and the ladder interval to retry 3. , 5, 15, 30, 60, 600, 3600 seconds, retry up to 10 times
Example
{
  "businessTaskId": "100846412",
  "resizeMode": 1,
  "showExtrasResults": true,
  "gfpganVisibility": 0,
  "codeformerVisibility": 0,
  "codeformerWeight": 0,
  "upscalingResize": 2,
  "upscalingResizeW": 2048,
  "upscalingResizeH": 2048,
  "upscalingCrop": false,
  "upscaler1": "ESRGAN_4x",
  "upscaler2": "None",
  "extrasUpscaler2Visibility": 1.0,
  "upscaleFirst": true,
  "image": "https://dbt-aigc.oss-cn-hangzhou.aliyuncs.com/Output-Img2/bbbb/selfapi/120/text2image/2024-01-11/147f64d5-25a9-40c3-b7bb-d7fc2aadb3b6-0.png"
}

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.zhiqite.com/AIGCImgOpenServ/saas/tool/enhance' \
--header 'X-Request-req-accessKeyId;' \
--header 'X-Request-req-accessKeySecret;' \
--header 'Content-Type: application/json' \
--data-raw '{
  "businessTaskId": "100846412",
  "resizeMode": 1,
  "showExtrasResults": true,
  "gfpganVisibility": 0,
  "codeformerVisibility": 0,
  "codeformerWeight": 0,
  "upscalingResize": 2,
  "upscalingResizeW": 2048,
  "upscalingResizeH": 2048,
  "upscalingCrop": false,
  "upscaler1": "ESRGAN_4x",
  "upscaler2": "None",
  "extrasUpscaler2Visibility": 1.0,
  "upscaleFirst": true,
  "image": "https://dbt-aigc.oss-cn-hangzhou.aliyuncs.com/Output-Img2/bbbb/selfapi/120/text2image/2024-01-11/147f64d5-25a9-40c3-b7bb-d7fc2aadb3b6-0.png"
}'

Responses

🟢200OK
application/json
Body
code
string 
required
data
object 
required
businessTaskId
string 
required
outputImageUrl
string 
required
Valid for one month
status
integer 
required
1: Generating 2: Success 0: Failure
taskId
string 
required
msg
string 
required
Example
{
    "code": "200",
    "data": {
        "businessTaskId": "1008464122",
        "outputImageUrl": "https://aigcoss.zhiqiteai.cn/Output-Img2/tool/enhance/extras-images/2024-01-12/8e792c3c-b220-4264-8703-b7174a81b25a-0.png",
        "status": 1,
        "taskId": "test1705047542608738174022"
    },
    "msg": "success"
}
Modified at 2024-08-09 00:58:24
Previous
Face restoration
Next
image description
Built with