API Documents - GuGuData | Production-Ready APIs Built for Developers
  1. DEMO
API Documents - GuGuData | Production-Ready APIs Built for Developers
  • GuGuData API documents
  • Metadata
    • DEMO
      • [DEMO] Global QS World University Rankings
      • [DEMO] Global University
      • [DEMO] Chinese Poem
    • Global QS World University Rankings
      GET
    • Global University
      GET
    • Chinese Poem
      GET
  • Website Tools
    • DEMO
      • [DEMO] Webpage Readable Content Extraction
      • [DEMO] Domain SSL Certificate Information Parsing
      • [DEMO] Domain DNS Information Query
      • [DEMO] Query Website Favicon and Title
      • [DEMO] Format International Phone
      • [DEMO] URL to static HTML
      • [DEMO] URL to Image
      • [DEMO] URL to Markdown
      • [DEMO] Get URL links
      • [DEMO] Website Snapshot
      • [DEMO] Domain Whois
      • [DEMO] IP Address
      • [DEMO] Article Extract
      • [DEMO] Geographic Coordinate System Converter
      • [DEMO] Extract Structured JSON from Webpage
    • Webpage Readable Content Extraction
      POST
    • Domain SSL Certificate Information Parsing
      GET
    • Domain DNS Information Query
      GET
    • Query Website Favicon and Title
      GET
    • Format International Phone
      GET
    • URL to static HTML
      POST
    • URL to Image
      GET
    • URL to Markdown
      POST
    • Get URL links
      GET
    • Website Snapshot
      POST
    • Domain Whois
      GET
    • IP Address
      GET
    • Article Extract
      POST
    • Geographic Coordinate System Converter
      GET
    • Extract Structured JSON from Webpage
      POST
  • Image Recognition
    • DEMO
      • [DEMO] HTML to PDF
        GET
      • [DEMO] Image OCR
        GET
      • [DEMO] PDF to Format
        GET
      • [DEMO] PDF Splitting
        GET
      • [DEMO] Markdown to PDF
        GET
      • [DEMO] PPT to Images
        GET
      • [DEMO] PDF to HTML
        GET
      • [DEMO] PDF Summary
        GET
      • [DEMO] Image Compress
        GET
      • [DEMO] Word to HTML
        GET
    • HTML to PDF
      POST
    • Image OCR
      POST
    • PDF to Format
      POST
    • PDF Splitting
      POST
    • Markdown to PDF
      POST
    • PPT to Images
      POST
    • PDF to HTML
      POST
    • PDF Summary
      POST
    • Image Compress
      POST
    • Word to HTML
      POST
  • QRcode and Barcode
    • DEMO
      • [DEMO] QR Code
      • [DEMO] Wifi QR Code
      • [DEMO] Bar Code
    • QR Code
    • Wifi QR Code
    • Bar Code
  • Text Tools
    • DEMO
      • [DEMO] Simplified and Traditional Chinese Converter
      • [DEMO] Text Similarity Calculator
    • Simplified and Traditional Chinese Converter
    • Text Similarity Calculator
  • healthcheck
    GET
  1. DEMO

[DEMO] Image Compress

GET
https://api.gugudata.io/v1/image/image-compress/demo
Last modified:2026-02-11 09:08:02
Image Compress
Compress and optimize images with customizable quality, dimensions, and format conversion. Supports both file upload and URL-based image processing with intelligent compression algorithms.
Method: POST
Path: /v1/image/image-compress
Demo: https://api.gugudata.io/v1/image/image-compress/demo
Request Parameters:
appkey (string, required): API key obtained after payment, can be passed as query parameter or in form data
file (file, optional): Image file to compress (JPEG, PNG, etc.). Either file or image_url must be provided, but not both
image_url (string, optional): URL of the image to compress. Either file or image_url must be provided, but not both
targetWidth (integer, optional): Target width in pixels. Image will be resized to this width while maintaining aspect ratio
targetHeight (integer, optional): Target height in pixels. Image will be resized to this height while maintaining aspect ratio
maxWidth (integer, optional): Maximum width in pixels. Image will be resized if it exceeds this width, maintaining aspect ratio
maxHeight (integer, optional): Maximum height in pixels. Image will be resized if it exceeds this height, maintaining aspect ratio
quality (integer, optional): Compression quality (1-95). Higher values mean better quality but larger file size. Default is 85
format (string, optional): Output format (JPEG, PNG, etc.). If not specified, original format is preserved
Response Fields Count: 1
Response Field Examples:
image: Compressed image file stream (JPEG, PNG, etc.) with appropriate Content-Type header
Key Features:
Support both file upload and URL-based image processing
Intelligent compression with customizable quality (1-95)
Flexible dimension control with target size and max size options
Automatic aspect ratio preservation during resizing
Format conversion support (JPEG, PNG, etc.)
Details:
https://gugudata.io/details/image-compress

Request

None

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.gugudata.io/v1/image/image-compress/demo'

Responses

⚪0
application/json
Body

Example
{
  "image": null,
  "DataStatus": {
    "StatusCode": 100,
    "StatusDescription": "OK",
    "ResponseDateTime": "2026-01-01 00:00:00",
    "DataTotalCount": 1
  }
}
Modified at 2026-02-11 09:08:02
Previous
[DEMO] PDF Summary
Next
[DEMO] Word to HTML
Built with