Skip to main content

API reference

Base URL

All requests should be made to the following base URL:

https://resizer.usebaked.com/api?

Basic options

ParameterTypeDescriptionDefault Value
urlstringRequired. The URL of the image to process. if a path is provided, the resizer will append the path to the referring domain. if you pass /example.jpg, the output will be refer_domain+/example.jpg. or pass absolute urls.
wnumberSpecifies the output width of the image in pixels.Original image width
hnumberSpecifies the output height of the image in pixels.Original image height
qnumberOutput quality of the image.80

Format options

ParameterTypeDescriptionDefault Value
blurnumberApplies a blur effect. Value specifies the intensity.
maskstringApplies a mask to the image, possible values: circle
contain_bgstringSets the background color when using fit=contain.
mask_bgstringSets the background color when using a mask.
fitstringDefines how the image should fit within the given dimensions. Supported values: cover, contain, fill, inside, outside.cover

Advanced options

ParameterTypeDescriptionDefault Value
formatstringSpecifies the output image format. Supported values: webp, jpeg, png, gif, avif, svg, heic.webp
progressivebooleanIf true, generates a progressive (interlaced) image for faster loading.false
maxagestringSets the Cache-Control header to specify the maximum age for caching.30d
filenamestringSets the file name in the Content-Disposition header. Must be alphanumeric.image
dprnumberSpecifies the device pixel ratio for high-resolution displays.1
animatedbooleanEnables animated output for GIF or WebP formats.false
base64booleanIf true, returns the image as a Base64-encoded string.false

Example Request

Resize an image to 500x500 pixels, convert it to WebP format, and set the quality to 90:

https://resizer.usebaked.com?url=https://example.com/image.jpg&width=500&height=500&format=webp&quality=90