Getting Started
How It Works
Documentation
Pricing

Getting Started with NowTiny API

The NowTiny API allows you to compress and convert images programmatically. Get started in minutes with our simple REST API.

Quick Start

  1. Sign Up: Create a free account at NowTiny
  2. Get API Key: Navigate to Dashboard and generate your API key
  3. Make Your First Request: Use the API key to compress your first image
  4. Integrate: Add the API to your application

Your First API Call

Simple Compression

curl -X POST https://nowtiny.co/api/compress/ \
  -H "Authorization: Bearer your_api_key_here" \
  -F "images[]=@/path/to/image.jpg"

Compression with Resize

curl -X POST https://nowtiny.co/api/compress/ \
  -H "Authorization: Bearer your_api_key_here" \
  -F "images[]=@/path/to/image.jpg" \
  -F "target_width=1920"

Compression with Format Conversion

curl -X POST https://nowtiny.co/api/compress/ \
  -H "Authorization: Bearer your_api_key_here" \
  -F "images[]=@/path/to/image.jpg" \
  -F "convert_to_format=webp"

πŸš€ Fast Processing

Images compressed in seconds with optimized algorithms

πŸ”’ Secure

All uploads are encrypted and automatically deleted after processing

πŸ“Š Multiple Formats

Support for PNG, JPEG, WebP, and AVIF formats

πŸ“ Image Resizing

Downscale images while preserving aspect ratio (no upscaling)

How It Works

NowTiny uses advanced compression algorithms to reduce image file sizes while maintaining visual quality.

Compression Process

  1. Upload: Send your image via HTTP POST request with your API key
  2. Process: Our servers apply format-specific compression (pngquant for PNG, jpegli for JPEG)
  3. Resize (Optional): Downscale images to target dimensions while preserving aspect ratio
  4. Convert (Optional): Transform images to modern formats like AVIF or WebP
  5. Download: Receive compressed image URL in the response

Supported Formats

PNG

Lossless compression with pngquant (q=65)

JPEG

Advanced compression with jpegli (q=50)

WebP

Modern format with superior compression

AVIF

Next-gen format with best compression ratios

API Flow

Client App β†’ API Request (with API Key)
             ↓
    Validate API Key & Check Credits
             ↓
    Process Image (Compress/Convert)
             ↓
    Return Download URL & Stats
             ↓
    Client Downloads Compressed Image

API Documentation

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer your_api_key_here

Endpoints

POST /api/compress/

Compress and optionally convert images. Supports up to 100,000 images in a single request.

Request Parameters

  • images[] (required): Image file(s) to compress (max 5MB per file for free users, 150MB for Pro). Use array format for multiple files.
  • convert_to_format (optional): Target format - avif, webp, jpg, or png
  • target_width (optional): Target width in pixels (1-16000). Images will only be downscaled, never upscaled.
  • target_height (optional): Target height in pixels (1-16000). Images will only be downscaled, never upscaled.

Example Request (Format Conversion)

curl -X POST https://nowtiny.co/api/compress/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "images[]=@photo.jpg" \
  -F "convert_to_format=avif"

Example Request (Downscale/Resize)

curl -X POST https://nowtiny.co/api/compress/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "images[]=@photo.jpg" \
  -F "target_width=1920" \
  -F "target_height=1080"

Example Request (Combined: Conversion + Resize)

curl -X POST https://nowtiny.co/api/compress/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "images[]=@photo.jpg" \
  -F "convert_to_format=webp" \
  -F "target_width=1920"

Example Request (Multiple Images)

curl -X POST https://nowtiny.co/api/compress/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "images[]=@photo1.jpg" \
  -F "images[]=@photo2.png" \
  -F "images[]=@photo3.webp"

Example Response (Single Image)

{
  "success": true,
  "results": [
    {
      "success": true,
      "filename": "photo.jpg",
      "originalSize": 2847392,
      "compressedSize": 458729,
      "compressionRate": 83.9,
      "downloadFile": "compressed_1234567890.avif"
    }
  ]
}

Example Response (Multiple Images)

{
  "success": true,
  "results": [
    {
      "success": true,
      "filename": "photo1.jpg",
      "originalSize": 2847392,
      "compressedSize": 458729,
      "compressionRate": 83.9,
      "downloadFile": "compressed_1234567890.jpg"
    },
    {
      "success": true,
      "filename": "photo2.png",
      "originalSize": 1523841,
      "compressedSize": 312847,
      "compressionRate": 79.5,
      "downloadFile": "compressed_1234567891.png"
    },
    {
      "success": false,
      "filename": "photo3.webp",
      "error": "File size exceeds limit"
    }
  ]
}

Error Response

{
  "success": false,
  "error": "Insufficient credit balance",
  "remainingCredits": 0
}

Rate Limits

Free users: 1000 images per month (then $0.002/image)

Pro users: Unlimited images

API Pricing

Simple, transparent pricing for API usage. Start free, scale as you grow.

  • First 1000 images/month FREE
    Perfect for getting started and small projects
  • After 1000: $0.002/image
    Only pay for what you use beyond the free tier
  • Insufficient balance = API rejection
    Add credits to your account to continue using the API

Pro Plan Benefits

Unlimited Processing

No monthly limits on image compression

Larger Files

Upload files up to 150MB (vs 5MB free tier)

Priority Support

Faster response times and dedicated assistance

No Rate Limits

Process as many images as needed, anytime

Example Costs

Monthly Usage          Cost
─────────────────────────────
500 images             $0 (free tier)
1,500 images           $1 (500 Γ— $0.002)
5,000 images           $8 (4,000 Γ— $0.002)
10,000 images          $18 (9,000 Γ— $0.002)