AI to PNG API
POST an Illustrator file to /v2/convert/ai/to/png and receive a lossless PNG for every artboard. The sample asks for ImageResolution=300, so each 192 × 144 pt artboard becomes an 800 × 600 PNG that records 300 DPI.
- Endpoint
- POST /v2/
convert/ ai/ to/ png - Accepts
- ai
- Sample timing
- 14 ms median of 5 runsHow we measure
- Request size
- Up to 10 MB on the Free plan or 100 MB on paid plans, all files together
Request and response
Every sample below ran against the API before this page was published. Set PDFCONVERSIONAPI_KEY to your key and run it as is.
curl -sS -X POST \
https://api.pdfconversionapi.com/v2/convert/ai/to/png \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@quillback-ridge-logo-sheet.ai \
--form-string ImageResolution=300 \
-o response.json
# FileData is base64. Save the first file in converted/,
# or print the JSON error.
if jq -e '.Files' response.json > /dev/null; then
mkdir -p converted
name=$(jq -r '.Files[0].FileName' response.json)
jq -r '.Files[0].FileData' response.json \
| base64 --decode > "converted/$name"
else
cat response.json
fiimport base64
import os
import requests
key = os.environ["PDFCONVERSIONAPI_KEY"]
response = requests.post(
"https://api.pdfconversionapi.com/v2/convert/ai/to/png",
headers={"Authorization": f"Bearer {key}"},
files=[
("File", open("quillback-ridge-logo-sheet.ai", "rb")),
],
data={
"ImageResolution": "300",
},
timeout=180,
)
result = response.json()
if not response.ok:
raise SystemExit(f"{result['Code']}: {result['Message']}")
os.makedirs("converted", exist_ok=True)
for file in result["Files"]:
path = os.path.join("converted", file["FileName"])
with open(path, "wb") as out:
out.write(base64.b64decode(file["FileData"]))
print(path, file["FileSize"], "bytes")
import { mkdir, readFile, writeFile } from "node:fs/promises";
import { join } from "node:path";
const form = new FormData();
const file = "quillback-ridge-logo-sheet.ai";
form.append("File", new Blob([await readFile(file)]), file);
form.append("ImageResolution", "300");
const url = "https://api.pdfconversionapi.com/v2/convert/ai/to/png";
const key = process.env.PDFCONVERSIONAPI_KEY;
const response = await fetch(url, {
method: "POST",
headers: { Authorization: `Bearer ${key}` },
body: form,
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.Code}: ${result.Message}`);
}
await mkdir("converted", { recursive: true });
for (const file of result.Files) {
const path = join("converted", file.FileName);
await writeFile(path, Buffer.from(file.FileData, "base64"));
console.log(path, file.FileSize, "bytes");
}
{
"ConversionCost": 1,
"ConversionTime": 0.014,
"Files": [
{
"FileName": "quillback-ridge-logo-sheet-1.png",
"FileExt": "png",
"FileSize": 51416,
"FileData": "iVBORw0KGgoAAAANSUhEUgAA…"
},
{
"FileName": "quillback-ridge-logo-sheet-2.png",
"FileExt": "png",
"FileSize": 50266,
"FileData": "iVBORw0KGgoAAAANSUhEUgAA…"
}
]
}Response from our test run on 2026-11-03. ConversionTime shows the median of 5 runs. FileData is shortened here; the real response carries the whole file as base64.
The sample, converted
The same file the code sends. Download the input and the output and compare them yourself.

- Input
- quillback-ridge-logo-sheet.ai (10 KB)
- Output
- quillback-ridge-logo-sheet-1.png (50 KB)quillback-ridge-logo-sheet-2.png (49 KB)
- Source
- A two-artboard logo sheet for a fictional trail club, a full-color badge and a one-color version, which we wrote as a PDF-compatible Illustrator file with the lettering already in outlines. (CC0-1.0). How it was made
- Made by
- 2026-11-04, API build
9eeeb0640aba
Parameters
Send these as form fields next to the file. Names are case-insensitive. If you set one of the documented options below that we don't support yet, the request fails with a 400 that names it instead of returning a file made without it.
| Parameter | What it does |
|---|---|
ImageResolutioninteger, default 150 | Dots per inch for drawing. Pixel size is the artboard in points × DPI ÷ 72: 400 × 300 at the default, 800 × 600 at 300, 1600 × 1200 at 600. A value you send is stored in the PNG's pHYs chunk; without it the PNG has no DPI. ConvertAPI's default is 200.Values: 36–600 |
PageRangestring | Artboards to render, numbered in the order the file stores them. Leave it out for all of them.Values: 1, 2-4, 1,3, last |
ImageWidthinteger | Target width in pixels. The artboard is drawn at the scale this needs, which for 1200 px gave the same pixels as 450 DPI.Values: 1–20000 |
ImageHeightinteger | Target height in pixels; on its own it derives the width (600 gave 800 × 600). With ImageWidth, the artboard fits inside both.Values: 1–20000 |
ScaleProportionsboolean, default true | Set false with both sizes to stretch the artboard into them exactly. |
ScaleIfLargerboolean, default false | With true, a size larger than the 150 DPI drawing is ignored and only reductions apply. |
ScaleImageboolean, default true | false renders at ImageResolution and crops ImageWidth × ImageHeight from the top left: 200 × 100 kept the upper-left part of the badge. |
TransparentColorstring | After drawing, every pixel of exactly this color gets alpha 0, and only then does the PNG get an alpha channel. white cleared 85,569 pixels of artboard 1 at 150 DPI, the empty space and the white snow caps alike.Values: Color names, #RRGGBB or R,G,B |
BackgroundColorstring, default white | Color painted under the artwork. Combined with an identical TransparentColor it lets you key out the background while white artwork stays. |
ColorSpaceenum, default default | gray gives a one-channel gray PNG (9,987 bytes for artboard 1), or gray plus alpha with TransparentColor (12,103 bytes with white), and monochrome a two-level one. rgb gives the same file as the default, which is already 3-channel RGB. cmyk returns 400.Values: default, rgb, gray, monochrome |
Passwordstring | Password for an .ai file that needs one to open, the open or the owner password. Sent with a file that opens without one, it changes nothing: the sample gave the same PNG bytes. |
FileNamestring | Name for the PNGs before the artboard number and extension. |
StoreFileboolean, default false | With true the PNGs are stored for 3 hours and the response lists their URLs. |
What carries over, and what doesn't
Kept
- Exact pixels from the drawing: PNG is lossless, so flat brand colors and thin strokes stay clean
- The DPI you request, as a pHYs chunk: the sample's PNGs read 300 DPI
- Every artboard at its own size, each in its own file (800 × 600 for both sample artboards)
- Gradients, clipping and opacity: the clipped sky and the 85% sun on artboard 1
- Sharp lettering at any size, because the outlines are drawn at the output scale
Lost or not yet supported
- A transparent background by default. Artboards are drawn on
BackgroundColorand saved as 3-channel RGB with no alpha channel: the sample's PNGs are RGB files of 51,416 and 50,266 bytes. - Paths, layers and type. Use
/v2/convert/ai/to/svgwhen you need vectors. - Color management: CMYK is converted with a US web offset profile, and no ICC profile is written into the PNG.
Limits
- One file per request; up to 2,000 artboards are rendered in one call.
- Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
- No side of a drawn artboard may exceed 16,000 px (413).
- A PNG may hold at most 100,000,000 pixels; a 4:3 artboard at 12,000 px wide is over and returns 413.
ImageResolution36 to 600 DPI;ImageWidthandImageHeight1 to 20,000.- 120 seconds per conversion, then a 504.
Where teams use it
Logo exports for web and app builds
Keep the .ai as the only source and render the PNG sizes your front end needs in the build, one request per size, instead of exporting them by hand after every design change.
Print-size images with the right DPI
ImageResolution=300 gives pixel dimensions that print at the artboard's real size, and the PNG records 300 DPI. The sample's 800 × 600 PNG measures 2.67 × 2 inches, the size of its 192 × 144 pt artboard.
Previews in review tools
Show reviewers every artboard of an uploaded file as lossless PNG, with thin lines and lettering kept exact for comments and markup.
Questions
How do I get a PNG with a transparent background?
There is no transparent page option; BackgroundColor=transparent returns 400. TransparentColor=white clears every pure white pixel, which also removes white artwork such as the snow caps in the sample. Painting the page in a color the art doesn't use and keying that color out (BackgroundColor=#FF00FF with TransparentColor=#FF00FF) kept the snow, but left 2,165 pink-tinted pixels along the edges of the shapes. For clean transparency, convert to SVG instead.
What pixel size will each PNG have?
Width = artboard width in points × DPI ÷ 72, the same for height. The sample's 192 × 144 pt artboards are 400 × 300 at the default 150 DPI and 800 × 600 at 300 DPI. ImageWidth or ImageHeight set the size directly.
Why does my PNG have no DPI?
The DPI is written only when you send ImageResolution. Without it the PNG has no pHYs chunk, so the program that opens it decides the physical size.
Can I convert a password-protected .ai file?
Yes: send the password in Password. Our copy of the sample with a 256-bit open password returned 422 "the input file is password-protected" with no password and with a wrong one. With the open password, or with the owner password, it gave the same PNGs as the unprotected file.
Convert your first AI file in a minute.