Official Python SDK for HitPaw AI Image and Video Enhancement APIs.
- 🖼️ Image Enhancement - Upscale images 2x/4x with AI super-resolution
- 🎬 Video Enhancement - Upscale videos up to 4K with temporal stability
- 👤 Portrait Enhancement - Face restoration and beautification
- 🧹 Denoise & Restore - Remove noise, blur, and compression artifacts
- 🎨 Generative Models - AI reconstruction for severely degraded content
pip install hitpaw-upscale-apiOr install from source:
git clone https://github.com/HitPaw-Official/HitPaw-Enhancement-API-SDK.git
cd HitPaw-Enhancement-API-SDK
pip install -e .from hitpaw_upscale_api import HitPawUpscaleAPI, ImageModel, VideoModel
# Initialize with your API key
client = HitPawUpscaleAPI(api_key="your_api_key")
# Image Enhancement
result = client.enhance_image_and_wait(
img_url="https://example.com/photo.jpg",
model_name=ImageModel.GENERAL_2X,
extension=".jpg"
)
print(f"Enhanced image: {result['res_url']}")
# Video Enhancement
result = client.enhance_video_and_wait(
video_url="https://example.com/video.mp4",
model_name=VideoModel.GENERAL_RESTORE_2X,
resolution=[1920, 1080]
)
print(f"Enhanced video: {result['res_url']}")Our image processing services offer world-class capabilities designed to handle a wide variety of restoration scenarios:
- Upscale: Output high-resolution images from low-resolution input files using standard or high-fidelity models.
- Face Recovery: Ensure high-quality facial details, offering both "Clear" (soft/beauty) and "Natural" (textured/realistic) restoration options.
- Sharpen & Denoise: Bring images into focus by removing blur and sensor noise while preserving the original structure.
- Generative Restoration: Leverage Diffusion technology to reconstruct details in severely degraded portraits or general images.
Our video processing services provide industrial-grade solutions for restoring and upscaling video content:
- Video Upscale: Convert SD or HD footage to 4K Ultra HD clarity using deep convolution and feature learning technologies.
- Portrait Restoration: Specialized models to detect, stabilize, and enhance faces in video streams.
- General Restoration: A comprehensive solution based on GAN technology to de-noise, de-blur, and enhance details.
- Generative Reconstruction: Utilizing Stable Diffusion for video to reconstruct textures and details.
| Model | API Name | Description | Use Case |
|---|---|---|---|
| General Enhance | general_2x, general_4x |
Go-to solution for 2x/4x upscaling. Balances noise reduction with detail generation. | Social media, general photos |
| High Fidelity | high_fidelity_2x, high_fidelity_4x |
Designed for high-quality inputs. Strictly preserves original artistic intent and fine textures. | Professional photography, printing |
| Portrait Clear | face_2x, face_4x |
Dual-model: beautifies faces while sharpening background. | Portraits needing balance of beauty + clarity |
| Portrait Natural | face_v2_2x, face_v2_4x |
V2 model prioritizing realistic skin textures (pores, grain). | Professional restoration, realism |
| Sharp Denoise | sharpen_denoise_1x |
Aggressively removes noise while sharpening edges. 1x (no upscale). | Grainy, low-light photos |
| Detail Denoise | detail_denoise_1x |
Removes noise while preserving original texture and details. 1x. | Artistic photos, scanned documents |
| Model | API Name | Description | Use Case |
|---|---|---|---|
| Generative Portrait | generative_portrait_1x/2x/4x |
Diffusion-based for human subjects. Reconstructs realistic details. | Severely degraded portraits |
| Generative Enhance | generative_1x/2x/4x |
General-purpose Diffusion for landscapes, objects, architecture. | Low-quality general images |
| Model | API Name | Description | Use Case |
|---|---|---|---|
| Ultra HD | ultrahd_restore_2x |
Deep convolution for SD/HD to 4K. Smooth edges, anti-aliasing. | 1080p → 4K upscaling |
| General Restore | general_restore_1x/2x/4x |
GAN-based: de-noise, de-blur, enhance details. | Old clips, compressed videos |
| Portrait Restore | portrait_restore_1x/2x |
Multi-frame fusion for face restoration in video. | Blurry faces in video |
| Face Soft | face_soft_2x |
Face beautification with identity preservation. | Vlogs, livestreams |
| Generative Video | generative_1x |
Stable Diffusion for impossible restoration tasks. | Heavily degraded video |
| Category | Models | Max Input | Max Output | Formats |
|---|---|---|---|---|
| Enhancement & Denoise | face_, general_, high_fidelity_*, sharpen_denoise_1x, detail_denoise_1x | 70 MP | 432 MP | bmp, jpeg, jpg, png, jfif, tga, tiff, webp, heif |
| Generative | generative_portrait_, generative_ | 34 MP | 34 MP | bmp, jpeg, jpg, png, jfif, tga, tiff, webp, heif |
| Parameter | Limit |
|---|---|
| Input Formats | dv, mlv, m2ts, m2t, m2v, nut, ser, 3g2, 3gp, asf, avi, divx, f4v, flv, h261, h263, m4v, mkv, mov, mp4, mpeg, mpeg4, mpg, mxf, ogv, rm, rmvb, webm, wmv, etc. |
| Output Formats | mp4, mov, mkv, m4v, avi, gif |
| Max Resolution | 36 MP (total pixels) |
| Duration | 0.5s to 1 hour |
Before → After (left: before, right: after)
Diffusion-based for human subjects. Best for extremely low-quality portraits.
Ideal for heavily compressed or low-resolution general images.
Beautifies faces while sharpening background. 2x upscale.
Beautifies faces while sharpening background. 4x upscale.
Realistic skin texture recovery. 2x upscale.
Realistic skin texture recovery. 4x upscale.
General-purpose upscaling and enhancement. 2x upscale.
General-purpose upscaling. 4x upscale.
Preserves original artistic intent. 2x upscale.
Preserves original artistic intent. 4x upscale.
Aggressively removes noise while sharpening. 1x (no upscale).
Removes noise while preserving original texture. 1x (no upscale).
Click on any video thumbnail to watch
Deep convolution for SD/HD to 4K conversion | Watch Video
GAN-based comprehensive restoration | Watch Video
GAN-based comprehensive restoration | Watch Video
Multi-frame fusion for face restoration | Watch Video
Face beautification with identity preservation | Watch Video
Stable Diffusion reconstruction | Watch Video
- API Documentation
- Image API Reference
- Video API Reference
- Image Available Models
- Video Available Models
# Image enhancement
python -m hitpaw_upscale_api --api-key KEY --mode image \
--url https://example.com/image.jpg \
--model general_2x \
--extension .jpg \
--wait
# Video enhancement
python -m hitpaw_upscale_api --api-key KEY --mode video \
--url https://example.com/video.mp4 \
--model general_restore_2x \
--resolution 1920,1080 \
--waitMIT License











