apyhub
Back
▣ INGESTION KIT · MEDIA KIT

Resize and Convert Image API

What it does

Image Resizer takes an uploaded image, resizes it, and returns the transformed file as binary output. Send a JPEG, PNG, WebP, AVIF, TIFF, or GIF up to 10 MB and 40 megapixels, and choose how the image should be fit, sized, and encoded.

Use width and height to control the output dimensions. Choose fit as contain, cover, or fill depending on whether you want to preserve aspect ratio, crop to exact bounds, or stretch to the target size. You can also set to to convert the image to jpg, png, webp, or avif, and tune quality for jpg, webp, and avif outputs.

If you need to remove embedded metadata before publishing or sharing an image, set strip to true. That removes EXIF, XMP, and IPTC data, including details like GPS location. This is useful for CMS uploads, product listings, avatar processing, and any workflow where you need consistent image dimensions before storage or delivery.

The response is a binary image file, ready to save, serve, or pass to another step in your pipeline.

POST
Resize and Convert Image API
https://api.eu.apyhub.com/frolic/resize-and-convert-image/image/resize

QUICKSTART

GUIDE

Quickstart

Upload an image to resize it and return the converted file.

curl -X POST "https://api.eu.apyhub.com/frolic/resize-and-convert-image/image/resize" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.jpg"

What you'll get back

Returns a binary file (string with format: binary) containing the resized image.

TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body
Image (max 10 MB, 40 megapixels): JPEG, PNG, WebP, AVIF, TIFF or GIF
Output format: jpg, png, webp or avif (default: same as the input)
contain, cover or fill; cover and fill need width and height
Remove EXIF, XMP and IPTC metadata such as GPS location

About this endpoint

What it does

Resizes an uploaded image and returns the processed image as binary output. You can choose the output format, resizing behavior, dimensions, metadata stripping, and encoding quality.

Request Body

ParameterTypeMandatoryDescription
fileStringYesImage file upload. Max 10 MB and 40 megapixels. Supported input formats: JPEG, PNG, WebP, AVIF, TIFF, or GIF.
toENUMNoOutput format. Allowed values: jpg, png, webp, avif. Default: same as the input.
fitENUMNoResize mode. Allowed values: contain, cover, fill. Default: contain. cover and fill require both width and height.
stripBooleanNoRemove EXIF, XMP, and IPTC metadata, including GPS location data. Default: false.
widthIntegerNoOutput width in pixels. Minimum: 1, maximum: 10000.
heightIntegerNoOutput height in pixels. Minimum: 1, maximum: 10000.
qualityIntegerNoOutput quality for jpg, webp, and avif. Range: 1-100. Default: 85.

Response

Returns a binary file containing the resized image. The response body is a string with binary format.

ParameterTypeMandatoryDescription
(binary response)StringYesResized image output as binary data.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.