apyhub
FILE CONVERSION · FILE MANIPULATION

Convert SVG to WebP API

Hosted on ApyHub

What it does

Convert SVG images to WebP with the SVG to WebP Converter. Send either a source SVG file as multipart form data or a publicly accessible SVG URL, and get back the converted WebP as a file download or a signed URL.

Use the multipart endpoints when you already have the SVG in your application or upload pipeline. The image field accepts the source image file in SVG format. If you prefer remote conversion, send a url pointing to a publicly accessible SVG image. In both cases, you can pass an optional output query parameter to control the output filename.

The responses are simple and direct: either binary WebP content for download or a JSON object containing a data URI for the signed URL flow. That makes the service a good fit for asset pipelines, CMS imports, product image workflows, and any backend that needs to standardize vector artwork into a browser-friendly raster format.

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

Quickstart

Convert an SVG file to WebP and download the result.

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

What you'll get back

Returns a binary file containing the converted WebP output.

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 SVG format. Mandatory.

About this endpoint

What it does

Converts an uploaded SVG image to WebP and returns the generated file as binary download output.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename prefix, such as a base name for the generated file.

Request Body

ParameterTypeMandatoryDescription
imageStringYesThe source image file in SVG format. Mandatory.

Response

Returns is the converted WebP file 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 SVG to WebP (multipart, signed URL)
http://localhost:8080/apyhub/convert-svg-to-webp/multi-part/link
QUICKSTARTGUIDE

Quickstart

Convert an SVG image from a multipart upload into a WebP link.

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

What you'll get back

Returns a JSON object with a data string field containing the generated WebP 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 SVG format. Mandatory.

About this endpoint

What it does

Converts an uploaded SVG image to WebP and returns a JSON object containing a data URI string for the resulting output.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name or identifier for the conversion result.

Request Body

ParameterTypeMandatoryDescription
imageStringYesThe source image file in SVG format.

Response

Returns a JSON object with a data string field formatted as a URI. The success response body is an object wrapper with one top-level field: data (String).

ParameterTypeMandatoryDescription
dataStringYesA URI string containing the converted result.

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

Quickstart

Convert a public SVG URL to WebP by sending the SVG link in the request body.

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

What you'll get back

Returns a binary file response in WebP format.

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

About this endpoint

What it does

Converts an SVG image fetched from a publicly accessible URL into WebP and returns the converted file as a binary response.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename or base name.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL of the SVG image to convert. Must be a valid URI.

Response

Returns a binary response containing the converted WebP file.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

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

Quickstart

Convert a publicly accessible SVG URL to WebP by sending the source URL in the request body.

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

What you'll get back

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

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

About this endpoint

What it does

Converts an SVG image from a publicly accessible URL into a WebP image. The request sends the source SVG URL, and the response returns a JSON object containing a WebP file URL in data.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL of the SVG image to convert. Must be a valid URI.

Response

Returns a JSON object with a data string field formatted as a URI. The data field contains the converted WebP image URL.

ParameterTypeMandatoryDescription
dataStringYesURI of the generated WebP image.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
Publicly accessible URL of the source SVG 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.