Attest tools · Image transform

Resize an image online

Resize a 64 by 32 pixel sample image to 32 pixels wide while preserving its aspect ratio.

1 credit per successful call

Input JSON

{
  "file_base64": "PNG image, 64x32, 187 bytes, base64 in the real request",
  "operations": [
    {
      "op": "resize",
      "width": 32,
      "fit": "inside"
    }
  ]
}

Captured output JSON

{
  "operation": "transform",
  "format": "png",
  "width": 32,
  "height": 16,
  "frames": 1,
  "bytes": 123,
  "sha256": "618ba4466921c6c370993e40afa697674fef70487cc7a987c27397dbd2c709ec",
  "file_base64": "PNG image, 32x16, 123 bytes, base64 in the real response",
  "metadata": {
    "has_alpha": true,
    "has_profile": false,
    "exif_stripped": true
  },
  "operations_applied": [
    "resize"
  ],
  "input": {
    "format": "png",
    "width": 64,
    "height": 32,
    "frames": 1,
    "bytes": 187,
    "has_alpha": true,
    "has_profile": false,
    "orientation": 1,
    "channels": 4
  },
  "auto_oriented": false,
  "animation": {
    "input_frames": 1,
    "output_frames": 1,
    "all_frames_kept": true,
    "note": null,
    "animated_output_formats": [
      "gif",
      "webp"
    ],
    "frame_unsafe_operations": [
      "rotate",
      "trim",
      "flip"
    ]
  },
  "colour_profile": null,
  "output_bytes": 123,
  "limits": {
    "max_input_bytes": 3300000,
    "max_output_bytes": 3000000,
    "max_operations": 10,
    "max_input_pixels": 100000000,
    "max_output_pixels": 100000000,
    "max_dimension": 20000,
    "note": "Send the image as { url } or as { file_base64 }. A base64 file is capped at 3,300,000 bytes decoded, because the platform refuses a request body over 4.5MB and base64 is 4/3 the size of the file: 3,300,000 bytes arrives as a 4.4MB body. An image fetched from { url } is held to the same cap, so the two paths agree. The result is capped at 3,000,000 bytes for the same reason on the way back."
  },
  "notice": "EXIF, ICC and XMP metadata are removed from every image this endpoint returns, so a photo loses its camera details, its colour profile and any GPS tag. Treat the result as sRGB. Read the metadata first with { operation: \"metadata\" } if you need it, and pass include_gps: true there to see coordinates.",
  "source": "Your image, decoded and re-encoded in memory by libvips 8.18 through sharp 0.35 on the Attest API. Nothing is written to disk or kept, and the receipt for this call holds counts only. Every result is a fresh encode, so a JPEG in and a JPEG out is a new JPEG rather than your original bytes. General information about the file you supplied.",
  "checked_at": "2026-10-20T20:47:48.984Z"
}

API call

curl -s -X POST https://getattest.com.au/api/v1/image/transform \
  -H "authorization: Bearer $ATTEST_API_KEY" \
  -H "content-type: application/json" \
  --data-binary @request.json

Run this call with your own bearer key. Save the complete input as request.json, replacing file descriptions with your own base64 file content and any truncated text with the full text. Issue an API key.

About this example

The input was validated and run locally through the registered service. The output above is a display preview of the captured service result. File bytes are described instead of printed, and strings longer than 400 characters are truncated; the HTTP API also adds call_id, credits_charged and credits_remaining. Timestamps and generated identifiers will vary.

Source: apps/api/svc/image_transform.mjs

Tool reference and limits · API key guide