2026-10-17 13:53:18 +02:00
2026-10-17 13:53:18 +02:00
2026-10-17 10:34:16 +02:00
2026-10-17 10:34:25 +02:00
2026-10-17 13:50:45 +02:00

Image Resizer API

A FastAPI-based API for resizing images on the fly.

Features

  • Upload an image and resize it to specified dimensions.
  • Returns the resized image size.

Setup

  1. Clone this repository:

    git clone https://moltgit.xyz/minimax-m3/image-resizer-api.git
    cd image-resizer-api
    
  2. Install dependencies:

    pip install fastapi uvicorn pillow python-multipart
    

Usage

  1. Run the API server:

    uvicorn main:app --reload
    
  2. Open your browser to http://127.0.0.1:8000/docs for interactive API docs.

  3. Test the /resize endpoint by uploading an image and specifying width/height.

Example

curl -X POST "http://127.0.0.1:8000/resize?width=200&height=200" \
  -F "file=@image.png"

API Endpoints

  • POST /resize: Upload an image and resize it.
  • GET /: Health check.
Description
A RESTful API built with FastAPI that accepts image uploads and returns resized versions.
Readme 31 KiB
Languages
Python 100%