Image APIs
API reference › Conversions

Convert an image (SVG, PNG, JPEG, WebP, GIF or AVIF) to PNG, JPEG or WebP, resized if you like

POST/v1/conversions

POST/v1/conversions

Convert an image (SVG, PNG, JPEG, WebP, GIF or AVIF) to PNG, JPEG or WebP, resized if you like

An image you already have, in the format and size you need, at a hosted URL. Send JSON with one of url, upload, svg or data; or POST the file itself (its image Content-Type, or multipart with a file field) with the options in the query string (?format=webp&width=800).

SVG renders in a real browser with the Google Fonts it names, so text comes out as designed: the way to get a PNG of a diagram, logo or chart for email and social cards. An animated GIF or WebP gives its first frame. Without width or height the output keeps the image's own size, up to 4096 px on the longer side. Up to 10 MB and 50 megapixels in. Fetch the record again with get_image.

REQUEST BODY · APPLICATION/JSON
{
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\"><circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"#ffd60a\"/><text x=\"32\" y=\"40\" font-family=\"Inter\" font-weight=\"700\" font-size=\"20\" text-anchor=\"middle\">API</text></svg>",
  "format": "png",
  "width": 1024
}
In the full reference
REQUEST
curl -X POST "https://api.imageapis.com/v1/conversions" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\"><circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"#ffd60a\"/><text x=\"32\" y=\"40\" font-family=\"Inter\" font-weight=\"700\" font-size=\"20\" text-anchor=\"middle\">API</text></svg>",
  "format": "png",
  "width": 1024
}'
RESPONSE
200With response=binary: the file itself, with X-Image-Id and X-Image-Url headers
201Created
{
  "id": "img_5tq8mx2kzc4wnb7hd3vr",
  "object": "image",
  "status": "completed",
  "url": "https://img.imageapis.com/i/img_5tq8mx2kzc4wnb7hd3vr.png",
  "format": "png",
  "width": 1024,
  "height": 1024,
  "template": "convert",
  "bytes": 38102,
  "units": 1,
  "created": "2026-10-10T18:04:11Z",
  "completed": "2026-10-10T18:04:12Z",
  "expires": "2026-11-09T18:04:11Z",
  "source": {
    "format": "svg",
    "width": 64,
    "height": 64,
    "bytes": 2381
  }
}
202Accepted: rendering in the background; the record has status pending and the webhook gets the finished one
{
  "id": "img_5tq8mx2kzc4wnb7hd3vr",
  "object": "image",
  "status": "completed",
  "url": "https://img.imageapis.com/i/img_5tq8mx2kzc4wnb7hd3vr.png",
  "format": "png",
  "width": 1024,
  "height": 1024,
  "template": "convert",
  "bytes": 38102,
  "units": 1,
  "created": "2026-10-10T18:04:11Z",
  "completed": "2026-10-10T18:04:12Z",
  "expires": "2026-11-09T18:04:11Z",
  "source": {
    "format": "svg",
    "width": 64,
    "height": 64,
    "bytes": 2381
  }
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.