Metadata-Version: 2.1
Name: image_upscaling_api
Version: 2026.0.1
Summary: image-upscaling.net api client
Keywords: upscale,image upscale,ai,image-processing,image-upscaling,super-resolution,machine-learning,deep-learning,api,free
Author: Marvin Eckhardt
Maintainer: Marvin Eckhardt
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering :: Image Processing
Project-URL: Homepage, https://image-upscaling.net
Requires-Python: >=3
Requires-Dist: requests
Requires-Dist: opencv-python
Requires-Dist: numpy
Description-Content-Type: text/markdown


# image-upscaling-api

A simple Python wrapper for the [image-upscaling.net](https://image-upscaling.net) upscaling API.

## Installation
```bash
pip install image-upscaling-api
```

## Documentation

-   **Full API Documentation:** [image-upscaling.net/api.html](https://image-upscaling.net/api.html)
    
-   **Help on Model & Scale Config:** [get_upscalers_config](https://image-upscaling.net/get_upscalers_config)
- **Client ID:** 32 digits, 0-9, a-z, A-Z  
You can find your client id here: [image-upscaling.net/account](https://image-upscaling.net/account/en.html)  
If you have an account with positive balance, you need to use your linked client id from the account page to use your balance in this api.
    

## Examples
### 1. Basic File Upscaling
- Uploads an image from disk and saves it back to disk. 
- upscaled by 4x using the "plus" model
- The upscaler encodes your image as png but you can save it as any opencv supported extension.

```Python
from image_upscaling_api import UpscalerAPI

api = UpscalerAPI(client_id="a9898cb899c1542468b8555e59dfa331")

# Upload (scale: 4, model: plus)
img_id = api.upload("baboon.png", model="plus", scale=4, face_enhance=False)

# Download and save as jpg
api.wait_and_download(img_id, save_path="./baboon_upscaled.jpg")

```

### 2. OpenCV & Diffuser
- uses opencv images for upload and download
- uses diffuser model with fixed output resolution (-1 = 4MPx)
- no save_path  -> image is returned as opencv image

```Python
from image_upscaling_api import UpscalerAPI
import cv2

api = UpscalerAPI(client_id="a9898cb899c1542468b8555e59dfa331")

image = cv2.imread("photo1.jpg")

# Upload with diffuser-lite and custom prompt
img_id = api.upload(image, model="diffuser-lite", scale=-1, prompt="", creativity=0.1)

# Download back into numpy array
upscaled = api.wait_and_download(img_id)
cv2.imwrite("upscaled_photo1.png", upscaled)

```

## Github

Find the source code here: [[dercodeKoenig/image-upscaling.net_API](https://github.com/dercodeKoenig/image-upscaling.net_API)]

## License

MIT