apyhub
Back
▣ FILE CONVERSION · IMAGE PROCESSING

Convert JPEG to WebP API

Hosted on ApyHub

What it does

JPEG to WebP Converter turns a JPEG or JPG image into a WebP file. Send either a public image URL or a binary image upload, and choose whether you want the result returned as a downloadable file or as a signed URL in the response.

Use the URL-based endpoints when the source image already lives online, or the multipart endpoints when you're uploading a local file. The request body only needs url for URL conversions or image for multipart conversions. If you need a named output, pass output as a query parameter.

The response matches the delivery mode you choose: the download endpoints return binary WebP content, while the signed-URL endpoints return a JSON object with a data field containing a URI. That makes this service a good fit for image pipelines, CMS uploads, storage optimisation, and client-side delivery where smaller WebP assets reduce transfer size.

▣ ENDPOINT 01 / 04
POST
Convert JPEG to WebP
https://api.eu.apyhub.com/apyhub/convert-jpeg-to-webp/url/link

QUICKSTART

GUIDE

Quickstart

Convert a JPEG from a public URL into WebP by sending the image URL in the JSON body.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-jpeg-to-webp/url/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.jpg"}'

What you'll get back

Returns a JSON object with a data string field containing the generated WebP file URL.

{
  "data": "https://..."
}
TRY ITLIVE · 30 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.
body*
Publicly accessible URL of the source JPEG image. url is mandatory.
Publicly accessible URL of the JPEG image to convert. Mandatory.

About this endpoint

What it does

Converts a publicly accessible JPEG image URL into a WebP image and returns the resulting WebP URL in the response body. You provide the source image URL in the request body, and can optionally pass an output query parameter.

Query Parameter(s)

AttributeTypeDescription
outputStringOptional output name.

Request Body

ParameterTypeDescription
urlStringPublicly accessible URL of the source JPEG image to convert. Format: URI.

Response

Returns a JSON object with a data string field formatted as a URI. The data field contains the WebP image location produced by the conversion.

AttributeTypeDescription
dataStringThe url of the webp image.
▣ ENDPOINT 02 / 04
POST
Convert JPEG to WebP
https://api.eu.apyhub.com/apyhub/convert-jpeg-to-webp/multi-part/download

QUICKSTART

GUIDE

Quickstart

Upload a JPEG image and optionally set the output name to download the converted WebP file.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-jpeg-to-webp/multi-part/download?output=my-invite" \
  -H "apy-token: $APY_TOKEN" \
  -F "image=@/path/to/image.jpg" '

What you'll get back

Returns a binary file response containing the converted WebP image.

TRY ITLIVE · 30 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*
The source image file in JPEG/JPG format. Mandatory.

About this endpoint

What it does

Converts an uploaded JPEG/JPG image to WebP and returns the resulting file as a binary response. The request sends the source image in the body, and the response is the converted download.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput filename or identifier for the downloaded file.

Request Body

ParameterTypeDescription
imageBinaryThe source image file in JPEG/JPG format. Binary file upload.

Response

Returns a binary file response containing the converted WebP image.

AttributeTypeDescription
binary responseStringThe converted image file.

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

▣ ENDPOINT 03 / 04
POST
Convert JPEG to WebP
https://api.eu.apyhub.com/apyhub/convert-jpeg-to-webp/multi-part/link

QUICKSTART

GUIDE

Quickstart

Convert a JPEG/JPG image file to WebP by sending the required image upload and a destination name in the query string.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-jpeg-to-webp/multi-part/link?output=my-invite" \
  -H "apy-token: $APY_TOKEN" \
  -F "image=@/path/to/image.jpg"

What you'll get back

Returns a JSON object with a data string field containing the resulting WebP file URI.

{
  "data": "https://example.com/my-invite.webp"
}
TRY ITLIVE · 30 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*
The source image file in JPEG/JPG format. Mandatory.

About this endpoint

What it does

Converts a JPEG/JPG image provided in the request body into WebP format using a multipart upload flow with a signed URL. The success response returns a JSON object containing a data URI string.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput identifier.

Request Body

ParameterTypeDescription
imageBinaryThe source image file in JPEG/JPG format. Must be provided as binary data.

Response

Returns a JSON object with a data string field formatted as a URI. The field contains the result returned by the conversion flow.

ParameterTypeDescription
dataStringURI returned on success.

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

▣ ENDPOINT 04 / 04
POST
Convert JPEG to WebP
https://api.eu.apyhub.com/apyhub/convert-jpeg-to-webp/url/download

QUICKSTART

GUIDE

Quickstart

Convert a JPEG image from a public URL to WebP by sending the source image URL in JSON.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-jpeg-to-webp/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.jpg"}'

What you'll get back

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

TRY ITLIVE · 30 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.
body*
Publicly accessible URL of the source JPEG image. url is mandatory.
Publicly accessible URL of the JPEG image to convert. Mandatory.

About this endpoint

What it does

Converts a JPEG image available at a publicly accessible URL into WebP and returns the converted file as binary output.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput filename.

Request Body

ParameterTypeDescription
urlStringPublicly accessible URL of the JPEG image to convert. Must be a URI.

Response

Returns a binary file containing the converted WebP image. The success response is a binary payload, not a JSON object.

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