Pixazo API→Image Tools→SVG to PNG API

SVG to PNG API - Convert SVG to PNG API: Pricing, Documentation

by Pixazo

Not every surface can render SVG. Email clients, thumbnails, social previews, and older tooling need a raster. Pixazo's rasterize endpoint renders your SVG into a clean PNG that keeps its transparent background intact. Prefer a no-code option? The same conversion is available free in your browser as the SVG to PNG Converter.

Get API Key
SVG to PNG API

Models Version

Welcome Bonus

Get 10% Cashback on Your First Payment (up to $500)

Add funds and get 10% cashback on your first payment (up to $500).

Claim Your Cashback →

SVG to PNG API Documentation

Authentication

Every request is authenticated with your Pixazo API key in the Ocp-Apim-Subscription-Key header — the same key across every Pixazo endpoint.

HeaderRequiredValue
Ocp-Apim-Subscription-KeyYesYour Pixazo API key

SVG to PNG generate request

SVG is perfect for scalable UI and print, but countless destinations, email templates, marketplace thumbnails, Open Graph images, and legacy image pipelines, only accept raster formats. Rasterizing to PNG produces a fixed-resolution bitmap while preserving the alpha channel, so logos and icons stay transparent against any background. Pixazo's /media-tools/v1/image-convert endpoint rasterizes the vector and returns a PNG. Because PNG supports lossless transparency, it is the natural raster target for graphics that must sit cleanly over other content. This endpoint is live.

Endpoint: POST https://gateway.pixazo.ai/media-tools/v1/image-convert

Request Code

curl -X POST 'https://gateway.pixazo.ai/media-tools/v1/image-convert' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"image_url":"https://example.com/input.svg","to_format":"png","quality":92}'

Output

{
  "request_id": "req_9f3c1a7b2e",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/req_9f3c1a7b2e"
}

Webhook (Optional)

Instead of polling, include a webhook_url in the request body and Pixazo will POST the completed job payload to that URL when the conversion finishes. The webhook body is identical to the completed-status response shown under Retrieving Results.

Request Parameters

ParameterRequiredTypeDefaultAllowedDescription
image_urlRequiredstring—HTTP(S) URLURL of the source SVG. Rasterised safely via librsvg before conversion.
to_formatRequiredstring—"png"Raster output format.
qualityOptionalnumber921–100Encoder quality for lossy targets. Ignored for PNG.
webhook_urlOptionalstring—HTTP(S) URLReceive the completed job via webhook instead of polling.

Example Request

curl -X POST 'https://gateway.pixazo.ai/media-tools/v1/image-convert' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"image_url":"https://example.com/input.svg","to_format":"png","quality":92}'

Response

Every request returns a request_id immediately with a QUEUED status. Use the polling_url (or a webhook) to retrieve the finished file.

{
  "request_id": "req_9f3c1a7b2e",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/req_9f3c1a7b2e"
}

Request Headers

HeaderRequiredValue
Ocp-Apim-Subscription-KeyYesYour Pixazo API key
Content-TypeYesapplication/json

Response Handling

The submit call returns one of the HTTP status codes below. A 202 means the job was accepted — everything else is an error you should handle.

CodeMeaning
202Accepted — the job was queued; poll the status URL.
400Bad request — a parameter is missing or invalid.
401Unauthorized — missing or wrong API key.
Payment required — insufficient balance.
Too many requests — you are being rate-limited.
500Server error — transient; retry with backoff.

Error Responses

Errors return a JSON body with a machine-readable code and a human-readable message.

{
  "request_id": "req_9f3c1a7b2e",
  "status": "FAILED",
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Your account balance is too low to process this request."
  }
}

Retrieving Results

Poll the status endpoint until the job reaches COMPLETED (or FAILED).

curl 'https://gateway.pixazo.ai/v2/requests/status/req_9f3c1a7b2e' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_API_KEY'

Response (Completed)

{
  "request_id": "req_9f3c1a7b2e",
  "status": "COMPLETED",
  "model_id": "image-convert",
  "output": {
    "media_url": "https://api-assets.pixazo.ai/out/result.png",
    "media_type": "PNG"
  },
  "error": null,
  "created_at": "2026-01-01T00:00:00Z",
  "completed_at": "2026-01-01T00:00:04Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique id for this job.
statusstringOne of the job status values below.
output.media_urlstringURL of the converted file (when completed).
output.media_typestringOutput format (PNG).
errorobject | nullPopulated only when status is FAILED.

Status Values

StatusMeaning
QUEUEDJob accepted, waiting for a worker.
Conversion in progress.
COMPLETEDDone — the output URL is in the response.
FAILEDThe job could not be completed; see error.

SVG to PNG API Pricing

Your request will cost $0.002 per image.
Flat $0.002 per rasterised image.

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
241,400last 30d
~8,047 per day
Success rate
98.3%
of completed generations
Generation time
1.4savg
p95 2.2s
Requests
Sep 17max 9,600Oct 16
SVG to PNGAvg 8,047/day
Generation Time
Sep 17max 1.6sOct 16
SVG to PNGAvg 1.4s
Error Rate
Sep 17max 5.0%Oct 16
SVG to PNGAvg 1.7%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
98.30%
across all generations of this model family
Uptime
Sep 17max 100%Oct 16
SuccessfulAvg 98.31%