apyhub
Back
▣ INGESTION KIT · MEDIA KIT

Convert Image to WebP, AVIF, PNG or JPG API

What it does

Image Converter turns an uploaded image into JPG, PNG, WebP, or AVIF and returns the converted file as binary output.

Send a JPEG, PNG, WebP, AVIF, TIFF, or GIF file up to 10 MB and 40 megapixels, then choose the target format with to. For JPG, WebP, and AVIF output, you can also set quality from 1 to 100 to control compression. If you need to remove embedded metadata, set strip to true to remove EXIF, XMP, and IPTC data, including GPS location.

Use Image Converter when you need to normalize uploads into a browser-friendly format, generate smaller assets for delivery, or strip sensitive metadata before storing or sharing images. It is a straightforward fit for upload pipelines, content processing workflows, and media backends that need a consistent output image type.

POST
Convert Image
https://api.eu.apyhub.com/frolic/convert-image-to-webp-avif-png-jpg-api

QUICKSTART

GUIDE

Quickstart

Convert an image to your chosen format by uploading the file and setting the target type.

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

What you'll get back

Returns a binary file (string with format: binary) containing the converted 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
jpg, png, webp or avif
Image (max 10 MB, 40 megapixels): JPEG, PNG, WebP, AVIF, TIFF or GIF
Remove EXIF, XMP and IPTC metadata such as GPS location
1-100, for jpg, webp and avif

About this endpoint

What it does

Converts an uploaded image file to a different format and returns the converted image as binary data.

Request Body

ParameterTypeMandatoryDescription
fileStringYesImage file to convert. Max 10 MB and 40 megapixels. Supported input formats: JPEG, PNG, WebP, AVIF, TIFF, or GIF.
toENUMYesOutput format. Allowed values: jpg, png, webp, avif.
stripBooleanNoRemoves EXIF, XMP, and IPTC metadata such as GPS location. Default: false.
qualityIntegerNoOutput quality from 1 to 100. Applies to jpg, webp, and avif. Default: 85.

Response

Returns a binary file stream containing the converted image.

ParameterTypeMandatoryDescription
binaryStringYesConverted image file in binary format.

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.