apyhub
Back
▣ FILE CONVERSION · FILE MANIPULATION

Convert SVG to PNG API

Hosted on ApyHub

What it does

The SVG to PNG API converts SVG files into PNG images. Send the SVG as a public url in a JSON body, or upload it as an image file (up to 100 MB per request), and get the PNG back. Choose a /download endpoint to receive the PNG as a binary file, or a /link endpoint to get a JSON data field with a signed URL. The optional output query parameter sets the file name.

Use it wherever SVG isn't supported. Email clients, social preview cards, PDF tools, many CMSs, and older apps expect raster images, so converting SVG to PNG on the server keeps logos, icons, charts, and badges displaying correctly everywhere. Teams use the SVG to PNG API to turn uploaded vector logos into thumbnails, render generated charts for reports, and convert design assets in bulk from Python, Node.js, or any language that can send an HTTP request.

The PNG keeps the transparency of the original SVG, so logos still sit cleanly on any background.

After converting, adjust the image with the Image Resize API, shrink it with the Image Compression API, or create a smaller web version with the SVG to WebP API. To bundle images into a document, use the Image to PDF API. AI agents can also call it through ApyHub MCP.

▣ ENDPOINT 01 / 04
POST
Convert SVG to PNG (URL, download)
https://api.eu.apyhub.com/apyhub/svg-to-png-conversion/url/download

QUICKSTART

GUIDE

Quickstart

Convert an SVG from a public URL into a PNG by sending the source URL in JSON.

curl -X POST "https://api.eu.apyhub.com/apyhub/svg-to-png-conversion/url/download?output=my-invite" \
  -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 the PNG file as binary data.

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*
Prefer url;
Publicly accessible URL of the SVG to convert.

About this endpoint

What it does

Converts an SVG file available at a public URL into a PNG and returns the generated file as binary data. The request accepts the source SVG URL in the body and an optional output query parameter.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput file name or base name for the generated PNG.

Request Body

ParameterTypeDescription
urlStringPublicly accessible URL of the SVG to convert. Must be a valid URI.

Response

Returns the generated PNG as a binary response.

▣ ENDPOINT 02 / 04
POST
Convert SVG to PNG (URL, signed URL)
https://api.eu.apyhub.com/apyhub/svg-to-png-conversion/url/link

QUICKSTART

GUIDE

Quickstart

Convert a public SVG URL to a PNG link by sending the SVG URL in the JSON body.

curl -X POST "https://api.eu.apyhub.com/apyhub/svg-to-png-conversion/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 a URI for the generated PNG.

{
  "data": "https://apyhub-outgoing.s3.eu-west-1.amazonaws.com/mono-go/image-processor/general/svg-png_2026-08-07_32d46571.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARJOHWS6LWTUUGYPI%2F20260807%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20260807T121222Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&response-content-disposition=inline&response-content-type=image%2Fpng&X-Amz-Signature=36960ccf538afc215a4f441803e4175bb43dbb846b9b607ff4a6bbd389803ebd"
}
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*
Prefer url;
Publicly accessible URL of the SVG to convert.

About this endpoint

What it does

Converts an SVG available at a URL into a PNG image. The request sends the SVG URL, and the success response returns a JSON object containing a data URI for the generated PNG.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput name.

Request Body

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

Response

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

ParameterTypeDescription
dataStringURI of the generated PNG image.
▣ ENDPOINT 03 / 04
POST
Convert SVG to PNG (multipart, download)
https://api.eu.apyhub.com/apyhub/svg-to-png-conversion/multi-part/download

QUICKSTART

GUIDE

Quickstart

Upload an SVG image to download the PNG conversion.

curl -X POST "https://api.eu.apyhub.com/apyhub/svg-to-png-conversion/multi-part/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "image=@/path/to/image.svg"

What you'll get back

Returns a binary file containing the generated PNG 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*

About this endpoint

What it does

Uploads an SVG image as multipart form data and converts it to a PNG file for download. The request accepts the source image in the body and an optional output query parameter to influence the download name.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput name for the generated file.

Request Body

ParameterTypeDescription
imageBinarySVG image file to convert. Format: binary.

Response

Returns a binary file as the response body — the converted PNG image for download. The output schema is a binary string, so the success response is not JSON and has no top-level fields to document.

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 SVG to PNG (multipart, signed URL)
https://api.eu.apyhub.com/apyhub/svg-to-png-conversion/multi-part/link

QUICKSTART

GUIDE

Quickstart

Upload an SVG file to get back a PNG link.

curl -X POST "https://api.eu.apyhub.com/apyhub/svg-to-png-conversion/multi-part/link?output=my-invite" \
  -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 a URI for the generated PNG.

{
  "data": "https://apyhub-outgoing.s3.eu-west-1.amazonaws.com/mono-go/image-processor/general/svg-png_2026-08-07_d0ffb6b9.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARJOHWS6LWTUUGYPI%2F20260807%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20260807T121402Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&response-content-disposition=inline&response-content-type=image%2Fpng&X-Amz-Signature=3a3f7bd81a8472fd07571a38f13fd64a4ec95679fa6f625a8a36e05f307f159d"
}
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*

About this endpoint

What it does

Converts an uploaded SVG file to PNG and returns a JSON object containing a signed URL in data for the generated output.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput name or identifier for the generated file.

Request Body

ParameterTypeDescription
imageBinarySVG image file to convert. Binary upload.

Response

Returns a JSON object with a data string field containing a URI to the generated PNG output.

ParameterTypeDescription
dataStringSigned URI for the generated PNG file.

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.