
Restore Old Photos with AI: Colorize + Enhance Faces via API
Old family photos fade and lose detail over time. Restoring them used to require hours of Photoshop work. With two AI APIs, you can automate the entire process: colorize a black and white photo, then enhance the faces. The Pipeline Colorize : send the B&W photo to the Image Colorization API Enhance faces : pass the colorized result to the Face Restoration API Download : save the final restored image The second API call uses the output URL from the first step directly. No need to download and re-upload. Python Code import requests from pathlib import Path API_KEY = " YOUR_API_KEY " COLORIZE_URL = " https://photocolorizer-ai.p.rapidapi.com/colorize-photo " RESTORE_URL = " https://face-restoration.p.rapidapi.com/enhance-face " def restore_old_photo ( image_path , output_path = " restored.jpg " ): # Step 1: Colorize with open ( image_path , " rb " ) as f : color_resp = requests . post ( COLORIZE_URL , headers = { " x-rapidapi-key " : API_KEY , " x-rapidapi-host " : " photocolorizer-ai.p.ra
Continue reading on Dev.to Tutorial
Opens in a new tab




