apyhub
FILE CONVERSION

Convert PNG to WebP API

Hosted on ApyHub

What it does

PNG to WebP Converter turns PNG images into WebP files from either an uploaded binary image or a publicly accessible PNG URL. You can receive the converted image as a binary download or as a signed URL, depending on the endpoint you choose.

Send a PNG file in the image field for multipart requests, or send a source PNG url for URL-based requests. In both flows, the optional output query parameter lets you set the output name. The service returns either a WebP binary response or an object containing a data URI, so it fits both direct download workflows and systems that need a hosted result link.

Use PNG to WebP Converter when you need smaller image files for web delivery, asset pipelines, or automated media processing. It is a straightforward format conversion service: provide the source image, get WebP back, and move the result into your storage or application flow.

▣ ENDPOINT 01 / 04
POST
Convert PNG to WebP (multipart, download)
http://localhost:8080/apyhub/convert-png-to-webp/multi-part/download
QUICKSTARTGUIDE

Quickstart

Upload a PNG image to convert it to WebP and download the resulting file.

curl -X POST "http://localhost:8080/apyhub/convert-png-to-webp/multi-part/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "image=@/path/to/image.png"

What you'll get back

Returns a binary file , which is the converted WebP download.

(binary file)
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 PNG format. Mandatory.

About this endpoint

What it does

Converts an uploaded PNG image to WebP and returns the converted file as a binary response. The request sends the source image in the multipart body and can optionally include an output query parameter.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename or identifier.

Request Body

ParameterTypeMandatoryDescription
imageStringYesThe source image file in PNG format.

Response

Returns a binary file containing the converted WebP image.

AttributeTypeMandatoryDescription
binary fileStringYesThe converted WebP image as binary content.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object

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

▣ ENDPOINT 02 / 04
POST
Convert PNG to WebP (multipart, signed URL)
http://localhost:8080/apyhub/convert-png-to-webp/multi-part/link
QUICKSTARTGUIDE

Quickstart

Upload a PNG file and get back a WebP file link.

curl -X POST "http://localhost:8080/apyhub/convert-png-to-webp/multi-part/link" \
  -H "apy-token: $APY_TOKEN" \
  -F "image=@/path/to/image.png"

What you'll get back

Returns a JSON object with a data string field containing a URI to the converted file.

{
  "data": "https://example.com/output.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 PNG format. Mandatory.

About this endpoint

What it does

Converts an uploaded PNG image to WebP using a multipart request and returns a JSON object containing a data URI for the converted file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOptional output identifier. The schema does not define any constraints or default beyond being a string.

Request Body

ParameterTypeMandatoryDescription
imageStringYesThe source image file in PNG format. Binary upload.

Response

Returns a JSON object with a data string field formatted as a URI.

ParameterTypeMandatoryDescription
dataStringYesURI of the converted WebP output.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object

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 PNG to WebP (URL, download)
http://localhost:8080/apyhub/convert-png-to-webp/url/download
QUICKSTARTGUIDE

Quickstart

Convert a PNG from a public URL to WebP by sending the source image URL in the request body.

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

What you'll get back

Returns binary data: the generated WebP file.

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 PNG image. `url` is mandatory.
Publicly accessible URL of the PNG image to convert. Mandatory.

About this endpoint

What it does

Converts a PNG image from a publicly accessible URL into a WebP file and returns the converted file as binary data. The source image URL is provided in the request body, and an optional output query parameter can be used to name the download.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename prefix or name. Example: my-invite.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL of the PNG image to convert. Format: URI.

Response

Returns a binary response containing the converted WebP file. The success response is a raw binary payload rather than a JSON object.

ParameterTypeMandatoryDescription

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
Publicly accessible URL of the source PNG image. `url` is mandatory.
▣ ENDPOINT 04 / 04
POST
Convert PNG to WebP (URL, signed URL)
http://localhost:8080/apyhub/convert-png-to-webp/url/link
QUICKSTARTGUIDE

Quickstart

Convert a publicly accessible PNG by sending its URL in the request body.

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

What you'll get back

Returns a JSON object with a data string field containing the converted 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 PNG image. `url` is mandatory.
Publicly accessible URL of the PNG image to convert. Mandatory.

About this endpoint

What it does

Converts a PNG image from a publicly accessible URL into WebP format. The response returns a JSON object containing a data field with the URI of the converted result.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name/identifier.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL of the source PNG image to convert. Must be a URI.

Response

Returns a JSON object with a data string field formatted as a URI. The data value points to the converted output.

ParameterTypeMandatoryDescription
dataStringYesURI of the converted result.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
Publicly accessible URL of the source PNG image. `url` is mandatory.
▣ 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.