Skip to main content
Glama

Tanod Images

imagepeek: compress an image (optionally to a byte budget)

image_compress
Read-onlyIdempotent

imagepeek: Compress an image, optionally to a byte budget. Returns a smaller JPEG, WebP, AVIF or PNG with metadata stripped: at quality, or with max_bytes the highest quality that fits (bounded search; target_met false when none does); PNG can be quantised to colors. It never returns a larger file: if re-encoding does not shrink it, the original bytes come back with returned_original: true. Input: url or image_base64, optional format, quality, max_bytes, colors, lossless, progressive, keep_icc and auto_orient. Reads PNG, JPEG, WebP, GIF, TIFF, BMP, ICO and AVIF; other formats and images over 40 megapixels are refused (not charged). Output: base64 data_base64, without EXIF, GPS, XMP or IPTC; over 15 MB or 50 megapixels is a 413 (not charged). Images are never logged or stored. Typically 0.5-2 s. Price: USD 0.003. Free: 3 imagepeek calls per IP per UTC day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64.
colorsNopng: quantise to this many colours.
formatNoOutput format: jpeg, png, webp or avif (default: the input's).
qualityNoTarget (or, with max_bytes, highest) quality.
keep_iccNoKeep the ICC colour profile (default true).
losslessNowebp only: lossless encoding (default false).
max_bytesNoSize target: the highest quality that fits.
auto_orientNoApply the EXIF orientation first (default true).
progressiveNojpeg only: progressive encoding (default false).
image_base64NoThe image as standard or url-safe base64 (at most 10 MB decoded; a data:image/...;base64, prefix is fine); or use url.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytesNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
inputNo
notesNo
widthNo
formatNo
heightNo
sourceNo
encodesNo
final_urlNo
operationNo
source_urlNo
target_metNo
after_bytesNo
data_base64No
saved_bytesNo
saved_ratioNo
before_bytesNo
content_typeNo
quality_usedNo
returned_originalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / auto_orient / description
      Added value: +"Apply the EXIF orientation first (default true)."
    • addedInput schema / properties / format / description
      Added value: +"Output format: jpeg, png, webp or avif (default: the input's)."
    • addedInput schema / properties / keep_icc / description
      Added value: +"Keep the ICC colour profile (default true)."
    • addedInput schema / properties / lossless / description
      Added value: +"webp only: lossless encoding (default false)."
    • addedInput schema / properties / progressive / description
      Added value: +"jpeg only: progressive encoding (default false)."
    • changedInput schema / properties / url / description
      Previous value: -"Public http(s) URL of the image (at most 10 MB); or use image_base64."New value: +"Public http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "after_bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "before_bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "content_type": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "data_base64": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "encodes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "final_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "format": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "height": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "input": {
      +      "properties": {
      +        "animated": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "bytes": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "format": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "frames": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "has_alpha": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "height": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "width": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "notes": {
      +      "items": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "operation": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "quality_used": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "returned_original": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "saved_bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "saved_ratio": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "source_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "target_met": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "width": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources