Photo Enhancement

The Photo Enhancement API provides multiple image processing capabilities, including super-resolution, denoising, colorization, color enhancement, light enhancement, text enhancement, anime enhancement, and face processing. Through this API, you can submit image processing tasks and use the Task Status Query API to retrieve processing results.

If you've purchased, get your API KEY in personal center.

Already have your API Key? Skip the local setup and test the API directly in your browser.

Explore Playground
HitPaw API

Photo Enhancement API

Basic Information

  • API Endpoint: https://api-base.hitpaw.com/api/task-status
  • Request Method: POST
  • Content-Type: application/json
  • Authentication: APIKEY (passed via request header)
  • Request Parameters

    Parameter Type Required Description
    model_list string[] Yes Model list, multiple models can be selected for processing
    img_url string Yes Image URL address, must be publicly accessible
    extension string Yes Image extension, such as .jpg, .png, etc.
    upscale int No Upscaling factor, optional values: 1, 2, 4, 8
    exif bool No Whether to preserve EXIF information
    DPI int64 No Output image DPI value
  • Model List

    No. Model Name model_list Description
    1 Face Enhancement Model 2x face_2x -
    2 Face Enhancement Model 4x face_4x -
    3 Face Enhancement Model 2x (Denoise) face_2x_denoise -
    4 Face Enhancement Model 4x (Denoise) face_4x_denoise -
    5 B & W Model b_w -
    6 Anime Enhancement Model anime -
    7 Light Enhancement Model light -
    8 Color Enhancement Model color -
    9 Text Enhancement Model 4x text_4x -
    10 Text Enhancement Model 2x text_2x -
    11 General Enhancement Model 2x general_2x -
    12 General Enhancement Model 4x general_4x -
    13 Enhance Generative (Portrait) generative_portrait -
    14 Enhance Generative generative -
    15 Denoise denoise -

Model Usage Restrictions

Important Notes:

  1. Generative Models Restriction: The generative_portrait and generative models must be used individually only. They cannot be:

    • Combined with each other (e.g., ["generative_portrait", "generative"] is not allowed)
    • Combined with any other models (e.g., ["generative", "denoise"] is not allowed)
    • Only one model can be specified in model_list when using these generative models
  2. Valid Usage Examples:

    • ["generative_portrait"] - Correct (single generative model)
    • ["generative"] - Correct (single generative model)
    • ["general_2x", "denoise"] - Correct (non-generative models can be combined)
    • ["generative_portrait", "generative"] - Incorrect (cannot combine two generative models)
    • ["generative", "general_2x"] - Incorrect (generative model cannot be combined with other models)
    • ["generative_portrait", "denoise"] - Incorrect (generative model cannot be combined with other models)
  3. Other Models: All other models (1-12, 15) can be freely combined with each other in the model_list array.

Request Example

Request Headers

                      
                
APIKEY: your_api_key_here
Content-Type: application/json
                
              
            

Request Body

                      
                
{
  "model_list": ["general_2x", "denoise"],
  "img_url": "https://example.com/image.jpg",
  "extension": ".jpg",
  "upscale": 2,
  "exif": true,
  "DPI": 300
}
                
              
            

Success Response

                      
                
{
  "code": 200,
  "message": "",
  "data": {
    "job_id": "aaa"
  }
}
                
              
            
Parameter Type Description
code int Status code, 200 indicates success
message string Response message
data.job_id string Task ID, used for subsequent task status queries

Error Code Description

Error Code Description
110400000 Invalid API key
110402001 Insufficient account balance
110400002 Task does not exist
110400003 Task failed, please retry

Task Status Query API

Basic Information

  • API Endpoint: https://api-base.hitpaw.com/api/task-status
  • Request Method: POST
  • Content-Type: application/json
  • Authentication: APIKEY (passed via request header)
  • Request Parameters

    Parameter Type Required Description
    job_id string Yes Task ID, obtained from Photo Enhancement API response

    Response Parameters

                          
                      
      {
        "code": 200,
        "message": "",
        "data": {
          "job_id": "aaa",
          "status": "COMPLETED",
          "res_url": "https://example.com/result.jpg",
          "original_url": "https://example.com/original.jpg"
        }
      }
                      
                    
                  
    Parameter Type Description
    code int Status code, 200 indicates success
    message string Response message
    data.job_id string Task ID
    data.status string Task status, refer to [Status Code Description](#status-code-description)
    data.res_url string Result image URL, only valid when status is COMPLETED
    data.original_url string Original image URL

    Status Code Description

    Status Code Description
    CONVERTING Processing task in progress
    COMPLETED Task completed
    ERROR Task failed

Usage Examples

download
Click Here To Install
download
Click Here To Install