apyhub
FILE CONVERSION · FILE MANIPULATION

Convert SVG to PNG API

Hosted on ApyHub

What it does

SVG to PNG Converter turns an SVG into a PNG from either a public URL or an uploaded file. Send the source image, choose whether you want a binary download or a signed URL, and get the converted PNG back.

Use the /url/download and /url/link endpoints when the SVG is hosted at a publicly accessible URL. The request body takes url, and you can also pass output in the query. The download variant returns binary PNG data, while the link variant returns an object with a data field containing a URI.

Use the /multi-part/download and /multi-part/link endpoints when you already have the SVG as multipart form data. These endpoints accept an image file in the body, plus the same optional output query field. The response format again depends on the endpoint: binary PNG for download, or a signed PNG URL in data.

This is a good fit for generating preview images, rendering vector artwork into raster assets for systems that expect PNG, or converting uploaded design files into a format that's easier to store and deliver.

▣ ENDPOINT 01 / 04
POST
Convert SVG to PNG (URL, download)
http://localhost:8080/apyhub/mono-go-svg-to-png-conversion/url/download
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/apyhub/mono-go-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)

AttributeTypeMandatoryDescription
outputStringNoOutput file name or base name for the generated PNG.

Request Body

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

Response

Returns the generated PNG as a binary response.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
Prefer `url`;
▣ ENDPOINT 02 / 04
POST
Convert SVG to PNG (URL, signed URL)
http://localhost:8080/apyhub/mono-go-svg-to-png-conversion/url/link
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/apyhub/mono-go-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)

AttributeTypeMandatoryDescription
outputStringNoOutput name.

Request Body

ParameterTypeMandatoryDescription
urlStringNoPublicly 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.

ParameterTypeMandatoryDescription
dataStringNoURI of the generated PNG image.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
Prefer `url`;
▣ ENDPOINT 03 / 04
POST
Convert SVG to PNG (multipart, download)
http://localhost:8080/apyhub/mono-go-svg-to-png-conversion/multi-part/download
QUICKSTARTGUIDE

Quickstart

Upload an SVG image to download the PNG conversion.

curl -X POST "http://localhost:8080/apyhub/mono-go-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)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the generated file.

Request Body

ParameterTypeMandatoryDescription
imageStringYesSVG 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.

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 04 / 04
POST
Convert SVG to PNG (multipart, signed URL)
http://localhost:8080/apyhub/mono-go-svg-to-png-conversion/multi-part/link
QUICKSTARTGUIDE

Quickstart

Upload an SVG file to get back a PNG link.

curl -X POST "http://localhost:8080/apyhub/mono-go-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)

AttributeTypeMandatoryDescription
outputStringNoOutput name or identifier for the generated file.

Request Body

ParameterTypeMandatoryDescription
imageStringYesSVG image file to convert. Binary upload.

Response

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

ParameterTypeMandatoryDescription
dataStringYesSigned URI for the generated PNG file.

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.

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