Free Image & Video Compression API

Convert images to WebP or videos to MP4 on-the-fly. Store them on DigitalOcean or AWS — or get the compressed result directly.

processingImg

Built for Developers

  • ✔ API-first design for easy integration
  • ✔ WebP, JPEG, AVIF image conversion
  • ✔ MP4/WEBM video compression via ffmpeg
  • ✔ Upload to DigitalOcean Spaces or AWS S3
  • ✔ Up to 80% file size reduction
uploadImg

ShrinkAPI Documentation

Introduction

Want to save storage space and upload your images or videos to your cloud bucket without learning code? This quick guide walks you through everything – from creating an account to uploading and storing your files safely.

Quick Start Guide

  1. Login or Sign Up: Create an account or log in with your email and password. New users sign up, existing users log in.
  2. Choose Your Storage: During signup, choose where your files will be saved:
    - Add your own cloud storage details (S3 or DigitalOcean) if you want.
    - Or skip custom storage to use default processing.
  3. Upload an Image: Select the image you want to compress. The system compresses it automatically and stores it in your linked cloud or downloads to your device.
    Supported formats: .jpeg, .jpg, .png and more.
  4. Upload a Video (Optional): Compress video files like .mp4. Compressed videos are stored or downloaded just like images.

What You Get

  • Smaller file sizes
  • Secure cloud storage
  • Simple upload and download experience
  • Great for businesses, designers, students, and more

Need help? Our team is here anytime to assist you.

API Endpoints

Login

Route: /login

Basic user login API that returns an authorization Bearer token.

Payload example:
{
  "email": "user@example.com",
  "password": "example_password"
}

Signup

Route: /signup

User signup API that accepts optional custom storage credentials and returns an authorization Bearer token.

Request body example:
{
  "email": "example@example.com",
  "password": "example@123",
  "is_custom_storage": true,
  "storage_type": "s3",
  "storage_key": "s3-api-key",
  "storage_secret": "s3-api-secret-key",
  "storage_bucket": "s3-bucket-name",
  "storage_region": "s3-bucket-region"
}

Set is_custom_storage to false if you don't have S3 or DigitalOcean space.

Image Conversion

Route: /upload_image

Converts images (jpeg/png/jpg) to webp or avix formats.

Request parameters (form-data):
  • image_file (file): Image file upload
  • image_url (string): URL of image (can be from your S3 bucket)
  • filename (string): Optional filename to set
  • filetype (string): Desired format, webp (default) or avix
  • return_type (string): Defaults to upload URL; set to download to download file instead

Response:

Returns either JSON with compressed image URL and filename, or a direct file download depending on parameters and user setup.

Example JSON response:
{
  "detail": {
    "status": 200,
    "message": "Success",
    "data": {
      "compressed_url": "{s3_url}/files/compressed/bef866754d7-test.webp",
      "filename": "bef866754d7-test.webp"
    }
  }
}

Video Conversion

Route: /upload_video

Converts videos from MP4 format to WebM format.

Request parameters (form-data):
  • video_file (file): Video file upload
  • video_url (string): URL of video (can be from your S3 bucket)
  • filename (string): Optional filename to set
  • return_type (string): Defaults to upload URL; set to download to download file instead

Response:

Returns JSON with compressed video URL and filename, or direct file download.

Example JSON response:
{
  "detail": {
    "status": 200,
    "message": "Success",
    "data": {
      "compressed_url": "{s3_url}/files/videos/53ca1479fc0-testing_video.webm",
      "filename": "53ca1479fc0-testing_video.webm"
    }
  }
}

Quick API Example

curl -X POST https://shrinkapi.bytive.in/compress \
  -F "file=@product.jpg" \
  -F "store=aws" \
  -F "bucket=my-bucket" \
  -F "aws_key=..." \
  -F "aws_secret=..."

Need Help Integrating?

We built this for Kisna Diamonds. We can help you too.

hello@bytive.in
Schedule a Call