apyhub
Back

Resize Image from URL API

What it does

Resize Image lets you rescale any image from a public URL to the exact size you need. Send a GET request to /rescale-image with the source url and the target width and height, and the response is the resized image as binary data, ready to save or serve.

All four of url, width, height, and crop are required. The url can be up to 1000 characters long, and width and height each accept values from 1 to 5000 pixels. The crop parameter is a boolean that controls whether the image is cropped while it is rescaled.

Because the response is the image itself and not JSON, you can write it straight to a file, stream it to a client, or pass it to the next step of an image workflow without extra decoding.

Use Resize Image when you need thumbnails for listings and cards, fixed-size pictures for layouts, normalized image sizes in an upload pipeline, or lightweight resizing without hosting your own image processing.

GET
Rescale Image API
https://api.eu.apyhub.com/skycraft/resize-image-from-url-api/rescale-image

QUICKSTART

GUIDE

Quickstart

Rescales an image from a URL using the required query parameters.

curl -X GET "https://api.eu.apyhub.com/skycraft/resize-image-from-url-api/rescale-image?url=https://assets.apyhub.com/samples/sample.png&width=200&height=200&crop=true" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a binary file response, which is the resized image data.

TRY ITLIVE · 20 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.

About this endpoint

What it does

Rescales an image from a source URL to the requested width and height, with optional cropping behavior controlled by the crop query parameter. The successful response is the resized image as binary data.

Query Parameter(s)

AttributeTypeDescription
urlStringSource image URL. Maximum length: 1000 characters.
cropBooleanControls whether the image is cropped during rescaling.
widthIntegerTarget width in pixels. Minimum: 1, maximum: 5000.
heightIntegerTarget height in pixels. Minimum: 1, maximum: 5000.

Response

Returns a binary response body containing the rescaled image.

▣ 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.