ORA to WebP API
POST an OpenRaster file to /v2/convert/ora/to/webp and receive its merged layer stack as a lossless WebP. The encoder writes VP8L, adding an alpha channel only when the canvas has transparency, and decoding gives exactly the pixels our PNG route returns for the same file.
- Endpoint
- POST /v2/
convert/ ora/ to/ webp - Accepts
- ora
- Sample timing
- 45 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/ora/to/webp \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@garden-plan.ora \
-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/ora/to/webp",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("garden-plan.ora", "rb"))],
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 = "garden-plan.ora";
form.append("File", new Blob([await readFile(file)]), file);
const url = "https://api.pdfconversionapi.com/v2/convert/ora/to/webp";
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.045,
"Files": [
{
"FileName": "garden-plan.webp",
"FileExt": "webp",
"FileSize": 62112,
"FileData": "UklGRpjyAABXRUJQVlA4TIvy…"
}
]
}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
- garden-plan.ora (123 KB)
- Output
- garden-plan.webp (61 KB)
- Source
- A backyard vegetable garden plan that we drew and saved as an OpenRaster file with seven layers and a layer group, including a hidden layer and a multiply layer. (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 |
|---|---|
ImageWidthinteger | Width after compositing; a 200 px web preview of the plan is 200 × 150 and 35,908 bytes.Values: 1–16384 |
ImageHeightinteger | Height after compositing; also bounds the width when both are sent.Values: 1–16384 |
ScaleProportionsboolean, default true | Keep the 4:3 shape (default) or, with false, distort to the exact box (200 × 200 gave 42,096 bytes). |
ScaleIfLargerboolean, default false | Only downscale when true. |
ScaleImageboolean, default true | Crop the top-left area when false (120 × 90 is 5,646 bytes). |
ColorSpaceenum, default default | monochrome shrinks the plan to 1,484 bytes, since lossless WebP compresses two colors very well; gray gives 23,672.Values: default, rgb, gray, monochrome (also srgb, truecolors, grayscale); cmyk returns 400 |
TransparentColorstring | Makes one exact color transparent; pure white matched 13 pixels of the plan.Values: #RRGGBB, R,G,B or a color name |
FileNamestring | File name for the WebP, garden-plan.webp by default. |
StoreFileboolean, default false | Return a 3-hour download link instead of the encoded data. |
What carries over, and what doesn't
Kept
- Every pixel of the composite, identical to our PNG output for the same file
- Transparency where the canvas has it: a test .ora with a half-transparent layer kept its alpha of 128. The opaque sample plan is written as RGB, with no alpha channel at all
- Layer opacity, blend modes, groups and offsets, applied before encoding
Lost or not yet supported
- Lossy compression as an option:
ImageQualityis ignored, and quality 10 returned the same 62,112 bytes. - 16-bit depth. WebP stores 8 bits per channel.
- The layer structure and the hidden layer, which is not drawn.
- The 150 ppi; WebP has no resolution field, so
ImageResolutiondoes nothing here.
Limits
- One .ora per call; canvases up to 100,000,000 pixels and 300,000 px a side, within the WebP cap below.
- WebP sides of at most 16,384 px. A one-layer test .ora 16,385 px wide returned 413
WebP images can be at most 16,384 pixels on a side, and this one is 16,385×10and converted withImageWidth=16384. The plan stretched to 16,385 × 100 got 413 as well, ending in; lower ImageWidth or ImageHeightbecause those options set the size. - Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
- Requests stop with 504 after 120 seconds.
- Layer files inside the .ora must be raster images. PNG, JPEG, WebP, BMP, GIF and TIFF layers were read; an SVG layer returns 422.
Where teams use it
Web display of layered drawings
Show uploaded OpenRaster files on a website without losing detail: lossless WebP keeps every pixel of the composite and was 6% smaller than the PNG for the sample plan.
Transparent artwork from painting apps
An .ora drawn on a transparent canvas keeps its alpha in the WebP, so characters or stickers can be placed over any background.
Questions
Can I get a smaller lossy WebP?
Not from this route yet. It always writes lossless VP8L, so ImageQuality has no effect. Scale the image down with ImageWidth to save bytes, or use our ORA to JPG route for lossy output.
How much smaller than PNG is it?
For the garden plan, 62,112 bytes against 66,293 for the PNG, about 6% less, with identical pixels. Flat areas and limited palettes compress best: the monochrome version was only 1,484 bytes.
Does the WebP keep the layer stack?
No. WebP is a flat format, so the stack is composited first. Visible layers, their opacity, offsets and blend modes are applied, and hidden layers are skipped.
Convert your first ORA file in a minute.