Skip to content
pdfconversionapi

AI to WebP API

POST an .ai file to /v2/convert/ai/to/webp and get a lossless WebP for each artboard. With ImageWidth=640, the sample's two artboards came back at 640 × 480, 25,760 and 24,908 bytes.

Endpoint
POST /v2/convert/ai/to/webp
Accepts
ai
Sample timing
6 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/webp \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@quillback-ridge-logo-sheet.ai \
  --form-string ImageWidth=640 \
  -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
fi
200 OK6 ms median2 files, 49 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.006,
  "Files": [
    {
      "FileName": "quillback-ridge-logo-sheet-1.webp",
      "FileExt": "webp",
      "FileSize": 25760,
      "FileData": "UklGRphkAABXRUJQVlA4TItk…"
    },
    {
      "FileName": "quillback-ridge-logo-sheet-2.webp",
      "FileExt": "webp",
      "FileSize": 24908,
      "FileData": "UklGRkRhAABXRUJQVlA4TDhh…"
    }
  ]
}

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.

First page of quillback-ridge-logo-sheet-1.webp, rendered by the API
Input
quillback-ridge-logo-sheet.ai (10 KB)
Output
quillback-ridge-logo-sheet-1.webp (25 KB)quillback-ridge-logo-sheet-2.webp (24 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.

ParameterWhat it does
ImageWidthintegerPixel width of each WebP; the artboard is drawn at that scale. The sample sends 640.Values: 1–20000
ImageHeightintegerPixel height, with the width derived, or a box together with ImageWidth.Values: 1–20000
ScaleProportionsboolean, default truefalse with both sizes stretches the artboard to fill them.
ScaleIfLargerboolean, default falsetrue turns the size into a maximum: an artboard whose 150 DPI drawing already fits is not enlarged.
ScaleImageboolean, default truefalse crops the size you send from the top left of the 150 DPI drawing.
PageRangestringArtboards to export; all of them when left out.Values: 1, 2-4, 1,3, last
ImageResolutioninteger, default 150Sets the pixel size when no width or height is sent (300 gave 800 × 600). WebP has no DPI field, so nothing is recorded.Values: 36–600
TransparentColorstringGives every pixel of this exact color alpha 0, and only then is the WebP written with an alpha channel. white cleared 85,569 pixels of artboard 1 at 400 × 300, white artwork included.Values: Color names, #RRGGBB or R,G,B
BackgroundColorstring, default whitePaint under the artwork, which fills the empty parts of each artboard.Values: Color names, #RRGGBB or R,G,B
ColorSpaceenum, default defaultgray and monochrome reduce the colors (artboard 1 at 400 × 300: 7,704 bytes in gray, 1,908 in black and white); the WebP itself stays 3-channel RGB with equal values. cmyk returns 400.Values: default, rgb, gray, monochrome
PasswordstringOpen or owner password of a protected .ai file. With it, our encrypted copy of the sample gave WebPs identical to the original's; without it, 422.
FileNamestringBase name; each file ends in its artboard number.
StoreFileboolean, default falsetrue returns URLs that work for 3 hours.

Not supported yet

Setting one of these to anything but its default returns 400.

OptionWhat to do instead
ImageQualityOutput is always lossless. ConvertAPI's default of 75 passes; any other value returns 400 "ImageQuality is not supported yet for AI → WebP".

What carries over, and what doesn't

Kept

  • Exact pixels: the WebP is lossless (VP8L), so flat logo colors show no compression noise
  • Sharp edges at the width you request
  • Each artboard in its own file, at 640 × 480 for both sample artboards

Lost or not yet supported

  • Lossy WebP's smaller files: there is no quality setting.
  • Resolution metadata; WebP has nowhere to store DPI.
  • An alpha channel unless you key a color out: artboards are painted white first, so the sample's WebPs are RGB, and TransparentColor is what makes them RGBA.

Limits

  • One .ai file per request, at most 2,000 artboards.
  • Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
  • Drawn size capped at 16,000 px per side and 100,000,000 pixels; above either, 413.
  • Sizes from 1 to 20,000 px; ImageResolution from 36 to 600.
  • A 504 after 120 seconds.

Where teams use it

Web images straight from the design file

Serve logo and illustration artboards as WebP without an export step in a design tool: the site's build or CMS converts the .ai it already stores.

Responsive image sets

Call once per width, such as 320, 640 and 1280, to fill a srcset. Each size is drawn from the vectors, so the small ones are not blurry reductions of a large bitmap.

Questions

Is the WebP lossy or lossless?

Lossless. The files start with a VP8L chunk, and ImageQuality is refused unless it is 75, because there is no lossy mode to tune.

How does the size compare with PNG?

At the sample's 640 × 480, artboard 1 was 25,760 bytes as WebP and 41,617 bytes as PNG, 38% smaller, and decoding both gave identical pixels. At the default 400 × 300 it was 16,202 against 25,706 bytes, 37% smaller.

Can I get a transparent background?

Send TransparentColor=white. Every pure white pixel goes, including white parts of the artwork such as the sample's snow caps, and shape edges keep a light fringe because they blend into white. /v2/convert/ai/to/svg has no background at all.

Convert your first AI file in a minute.