Skip to content

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PixelScale — AI Image Upscaler

Python Flask React TypeScript License

A free, no-signup AI image upscaler that enhances photos up to their original resolution. Clean React frontend backed by a Flask REST API — no API key, no watermark, no account required.

Challenge Project — Credit: @cyber_bot01 · Built by SiamBhau


Features

  • 2× and 4× upscaling — choose your scale before processing
  • Drag & drop upload — or use the file picker
  • Before / after slider — compare original vs. upscaled side by side
  • One-click download — get your result instantly
  • Supports JPEG, PNG, WebP — up to 10 MB per image
  • REST API — integrate upscaling into your own projects
  • Zero friction — no signup, no watermark, completely free

How It Works

  1. User uploads an image via the web UI or API
  2. The Flask backend sends the image to an AI upscaling service
  3. The enhanced image URL is returned to the frontend
  4. User previews and downloads the result

The backend uses a session-based request flow with automatic retries (up to 3 attempts with exponential backoff) to handle transient failures gracefully.


Tech Stack

Layer Technology
Backend Python · Flask · Requests
Frontend React 18 · TypeScript · Vite
Styling Tailwind CSS
Icons Lucide React
Deploy Vercel (serverless) / any Python host

Project Structure

pixelscale/
├── api/
│   ├── __init__.py
│   └── upscaler.py        # Session management, nonce extraction, retry logic
├── web/
│   ├── src/
│   │   ├── components/
│   │   │   ├── Navbar.tsx
│   │   │   ├── Footer.tsx
│   │   │   ├── Hero.tsx
│   │   │   ├── Uploader.tsx
│   │   │   └── HowItWorks.tsx
│   │   ├── pages/
│   │   │   ├── Landing.tsx
│   │   │   ├── Upscale.tsx
│   │   │   └── ApiDocs.tsx
│   │   ├── App.tsx
│   │   └── main.tsx
│   ├── dist/              # Pre-built static frontend
│   ├── package.json
│   ├── vite.config.ts
│   └── tailwind.config.js
├── app.py                 # Flask entry point — serves API + static frontend
├── requirements.txt
└── vercel.json

API Reference

Base URL: http://localhost:5000

All error responses follow the same format:

{ "error": "Description of what went wrong" }

POST /api/upscale

Upload and upscale an image.

Requestmultipart/form-data

Field Type Required Description
image file Yes JPEG, PNG, or WebP — max 10 MB
scale string No "2x" or "4x" — default: "4x"

Success — 200

{
  "url": "https://cdn.example.com/upscaled-image.jpg",
  "name": "photo.jpg",
  "scale": "4x",
  "credit": "@cyber_bot01"
}

Errors

Status Reason
400 No image provided
413 File exceeds 10 MB limit
415 Unsupported file type
500 Upstream upscaling failed

GET /api/download

Proxy-download an upscaled image, bypassing CORS restrictions.

Query params

Param Description
url Image URL returned by /api/upscale

Response — raw image file with Content-Disposition: attachment


GET /api/health

Check if the API is running.

Response — 200

{
  "status": "ok",
  "credit": "@cyber_bot01"
}

License

MIT © SiamBhau

About

AI-powered image upscaler — enhance photos up to 4x resolution, free, no signup, no watermark.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages