Skip to main content
Glama

Tanod Images

imagepeek: resize an image

image_resize
Read-onlyIdempotent

imagepeek: Resize an image. Returns the image resized to width and/or height (or by scale) with fit inside (default), contain (letterboxed on background), cover (centre crop) or fill (stretched), Lanczos by default; never upscaled unless upscale is true (then upscale_prevented says so). Input: url or image_base64, width / height or scale, optional fit, resample, upscale, background, optional format, quality 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.002. Free: 3 imagepeek calls per IP per UTC day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fitNoWith width and height: inside (default; fit within, keep aspect), contain (fit within, padded to the exact box), cover (fill the box, centre crop) or fill (stretch).inside
urlNoPublic http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64.
scaleNoInstead of width/height.
widthNoTarget width in pixels (1-32768); give width, height, both, or scale.
formatNoOutput format (default: the input's; ICO in, PNG out).
heightNoTarget height in pixels (1-32768).
qualityNoEncoder quality 1-100 (lossy formats).
upscaleNoAllow output larger than the input.
losslessNowebp output: lossless encoding (default false).
optimizeNopng output: maximum (slower) compression (default false).
resampleNoResampling filter: nearest, box, bilinear, hamming, bicubic or lanczos (default).lanczos
backgroundNocontain padding colour (default transparent / white).
auto_orientNoApply the EXIF orientation first.
progressiveNojpeg output: 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
final_urlNo
operationNo
source_urlNo
data_base64No
content_typeNo
upscale_preventedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / fit / description
      Added value: +"With width and height: inside (default; fit within, keep aspect), contain (fit within, padded to the exact box), cover (fill the box, centre crop) or fill (stretch)."
    • addedInput schema / properties / height / description
      Added value: +"Target height in pixels (1-32768)."
    • addedInput schema / properties / lossless / description
      Added value: +"webp output: lossless encoding (default false)."
    • addedInput schema / properties / optimize / description
      Added value: +"png output: maximum (slower) compression (default false)."
    • addedInput schema / properties / progressive / description
      Added value: +"jpeg output: progressive encoding (default false)."
    • addedInput schema / properties / resample / description
      Added value: +"Resampling filter: nearest, box, bilinear, hamming, bicubic or lanczos (default)."
    • 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."
    • addedInput schema / properties / width / description
      Added value: +"Target width in pixels (1-32768); give width, height, both, or scale."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "content_type": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "data_base64": {
      +      "type": [
      +        "string",
      +        "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"
      +      ]
      +    },
      +    "source": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "source_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "upscale_prevented": {
      +      "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