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
}
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
}'
import requests
r = requests.post("https://api.imageapis.com/v1/conversions", headers={"X-API-Key": "YOUR_KEY"}, 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
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.imageapis.com/v1/conversions", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"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
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
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
}
}