Video Enhancement

If you encounter any issues or have questions about the Video Enhancer API, please contact our support team at [email protected].

This document provides detailed information about using the Video Enhancer API service.

API Endpoints

Video Enhancement Request

                  
https://api.hitpaw.com/api/v3/video-enhancer/export
              

Task Status Check

                  
https://api.hitpaw.com/api/v3/video-enhancer-api/task
              

Authentication

All API requests require an API key, which should be included in the request headers.

                  
ApiKey: YOUR_API_KEY
              

Request Format

HTTP Method

POST

Headers

  • Content-Type: application/json
  • ApiKey: YOUR_API_KEY
  • Request Body Parameters

    Parameter Type Required Description Default
    video_url string Yes URL of the video to be enhanced -
    extension string No File extension for the output video .mp4
    model_id int Yes ID of the enhancement model to apply -
    resolution array of int Yes Target resolution [width, height] -
    web_hook_url string No URL to receive notifications when processing completes -

    Example Request

                          
                        
    {
      "video_url": "https://example.com/video.mp4",
      "extension": ".mp4",
      "model_id": 17,
      "resolution": [1920, 1080],
      "web_hook_url": "https://your-server.com/webhook"
    }
                        
                      
                    

Enhancement Models

The following enhancement models are available:

Model ID Model Name
3 Color Enhancement
4 Animation Model
5 Colorize Model
6 Face Model (Sharp) + Colorize Model
15 Low-Light Enhancement Model
17 General Denoise Model (Balance)
18 Face Model (Sharp)
20 General Denoise Model (Quality)
24 Face Model (Soft)
25 Face Model (Soft) + Colorize Model

Credit Consumption Rules

Credit consumption is based on video resolution, frame rate, and duration:

Frame Rate ≤ 30 fps

Resolution Credits Per Minute Maximum Minutes
720P (1280 x 720) and below 1 600
1080P (1920 x 1080) and below 2 300
4K (2160 x 3840) and below 3 200
8K (4320 x 7680) and below 4 150

30 fps < Frame Rate ≤ 60 fps

Resolution Credits Per Minute Maximum Minutes
720P (1280 x 720) and below 2 300
1080P (1920 x 1080) and below 4 150
4K (2160 x 3840) and below 6 100
8K (4320 x 7680) and below 8 75

Frame Rate > 60 fps

Resolution Credits Per Minute Maximum Minutes
720P (1280 x 720) and below 4 150
1080P (1920 x 1080) and below 8 75
4K (2160 x 3840) and below 12 50
8K (4320 x 7680) and below 16 37.5

Response Format

Successful Response (HTTP 200)

                      
                
{
  "code": 200,
  "message": "Success",
  "data": {
    "job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  }
}
                
              
            

The job_id can be used to track the status of the video enhancement process.

Error Responses

HTTP Status Error Code Message Description
401 501001 The ApiKey is not valid Authentication failed due to an invalid API key
402 501002 The coins for this APIKEY is not enough Insufficient credits in your account
400 501016 The video url is not valid The provided video URL is invalid or inaccessible

Webhook Notifications

If you provide a web_hook_url in your request, our system will send a POST request to that URL when the enhancement process completes or encounters an error.

Webhook Request Format

                      
                
{
  "job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "res_url": "https://example.com/enhanced-video.mp4"
}
                
              
            

Status Values

Value Description
WAITING The job is queued and waiting to be processed
CONVERTING The job is currently being processed
COMPLETED The job has completed successfully
ERROR An error occurred during processing

Limits and Constraints

  • Video resolution constraints:
    1. Minimum resolution: 128 × 128 pixels
    2. Maximum resolution: 8K (7680 × 4320 pixels)
  • Video duration: Maximum 10 minutes
  • Video file size: Maximum 200MB
  • Supported input formats: MP4, AVI, MOV, MKV, WebM

Example Implementation

Task Status Checking

You can check the status of a video enhancement task by making a request to the status endpoint.

Endpoint

                  
https://api.hitpaw.com/api/v3/video-enhancer-api/task
              

HTTP Method

POST

Headers

  • Content-Type: application/json
  • ApiKey: YOUR_API_KEY
  • Request Body Parameters

    Parameter Type Required Description
    job_id string Yes The job ID received from the enhancement request

    Example Request

                          
                        
    {
      "job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "status": "CONVERTING",
      "res_url": "https://example.com/enhanced-video.mp4"
    }
                        
                      
                    

Response Format

The response format is identical to the webhook notification structure:

                  
{
"code": 200,
"data": {
  "job_id": "tZgnWAwQT80RgLNp4QToNHSW" //The current task id, used in the task query interface job_id parameter.
},
"message": "OK"
}
              
            

Where status can be one of the following values:

  • WAITING - The job is in queue
  • CONVERTING - The job is being processed
  • COMPLETED - The job has finished successfully
  • ERROR - An error occurred during processing

For jobs that are not yet complete, the res_url field might be empty.

Price Description

You can purchase API call points through online recharge and payment methods

download
Click Here To Install
download
Click Here To Install