PSD to WebP API
POST a .psd to /v2/convert/psd/to/webp and the response holds a lossless WebP, with an alpha channel when the document has transparency. The sample sends ImageWidth=200, which returns the 400 × 300 sticker as a 200 × 150 WebP of 15,204 bytes.
- Endpoint
- POST /v2/
convert/ psd/ to/ webp - Accepts
- psd
- Sample timing
- 91 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/psd/to/webp \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@night-market-sticker.psd \
--form-string ImageWidth=200 \
-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/psd/to/webp",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("night-market-sticker.psd", "rb"))],
data={
"ImageWidth": "200",
},
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 = "night-market-sticker.psd";
form.append("File", new Blob([await readFile(file)]), file);
form.append("ImageWidth", "200");
const url = "https://api.pdfconversionapi.com/v2/convert/psd/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.091,
"Files": [
{
"FileName": "night-market-sticker.webp",
"FileExt": "webp",
"FileSize": 15204,
"FileData": "UklGRlw7AABXRUJQVlA4TFA7…"
}
]
}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
- night-market-sticker.psd (173 KB)
- Output
- night-market-sticker.webp (15 KB)
- Source
- A layered event sticker we drew for this site: 400 x 300 pixels, 8 bits per channel, transparent around the sticker, with seven layers including a soft shadow, a Screen-blended moon, a two-layer text group and a hidden draft stamp. Written as a PSD by our own script from the published file format specification. (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 merging; the height follows. The sample's 200 gave 15,204 bytes, against 18,156 for a PNG of the same size.Values: 1–20000 |
ImageHeightinteger | Height after merging. Together with a width it defines a box, and the sticker keeps its 4:3 shape inside it.Values: 1–20000 |
ScaleProportionsboolean, default true | false stretches the sticker to the exact width and height. No effect without a size. |
ScaleIfLargerboolean, default false | true stops a resize from enlarging the canvas. |
ScaleImageboolean, default true | false cuts a region of the given size from the top-left corner instead of resizing. |
ColorSpaceenum, default default | gray stores gray values with the alpha kept: 14,782 bytes at full size, 7,660 at the sample's 200 px. The file is still a four-channel WebP.Values: default, rgb, gray, monochrome; cmyk returns 400 |
TransparentColorstring | Adds transparency for one exact color. At full size, #1E2A4A cleared the sticker's navy body: 81,034 transparent pixels in a 28,392-byte file.Values: #RRGGBB, R,G,B or a color name |
ImageResolutioninteger | Accepted, but WebP has no resolution field to hold it: at full size, 300 returned the same 28,158 bytes as no value.Values: 10–800 |
FileNamestring | Base name of the WebP, by default night-market-sticker. |
StoreFileboolean, default false | true keeps the WebP for 3 hours behind a link in Files[].Url. |
Not supported yet
Setting one of these to anything but its default returns 400.
| Option | What to do instead |
|---|---|
ImageQuality | Our WebP is always lossless. ConvertAPI's default of 75 is accepted; any other value returns 400 'ImageQuality is not supported yet for PSD → WebP'. |
What carries over, and what doesn't
Kept
- Every pixel and every alpha value of the merged layers: decoded, the WebP equals the PNG the API makes from the same PSD
- The soft shadow's partial transparency, in 8 bits, so the sticker sits on any page color
- Opaque documents as plain RGB: a 64 × 48 opaque test PSD came back as a WebP with no alpha channel
- Blend modes, layer masks, clipping and groups as merged by the API; hidden layers stay out
- A size in bytes below PNG for this file: 28,158 against 35,428 at 400 × 300
Lost or not yet supported
- Layers, and with them the DRAFT stamp kept hidden in the PSD.
- Bit depth over 8: 16-bit PSDs are reduced to 8 bits per channel.
- The 300 ppi setting and the color profile; the file holds only a VP8L chunk.
- Lossy compression. No quality setting exists on this route, so you cannot trade detail for a smaller file.
Limits
- One PSD per request.
- Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
- WebP sides of at most 16,384 px. A 30,001 px wide PSD returned 413 'WebP images can be at most 16,384 pixels on a side, and this one is 30,001×1'; sent with
ImageWidth=16385, the same file got a 413 that also asks for a lowerImageWidthorImageHeight. - Up to 100,000,000 pixels after flattening, or 413.
- 120 seconds per conversion, then 504.
- Our test PSDs hold pixel layers, masks, groups and blend modes; type layers, smart objects and layer effects are not tested yet.
Where teams use it
Transparent web graphics from design files
Stickers, badges and cut-out product shots designed in PSD can go to the page as WebP with their alpha intact, without a separate export step in the editor.
Smaller files than PNG at the same quality
Both formats are lossless here. For the sticker at full size the WebP was 28,158 bytes and the PNG 35,428, which adds up across a page of assets.
Questions
Is the WebP lossy or lossless?
Lossless, always. The file holds a single VP8L chunk, and every decoded pixel and alpha value matches the PNG of the same PSD. ImageQuality other than 75 is refused with 400 rather than ignored, so a request never silently gets a different result than it asked for.
Does transparency survive?
Yes, with 8 bits of alpha. At full size the WebP keeps all 10,195 clear pixels around the sticker and the 18,056 partly clear ones in its shadow and along the card's anti-aliased rim, which a GIF could not.
Why did my very wide PSD fail?
WebP cannot store an image wider or taller than 16,384 pixels. A 30,001 × 1 test PSD returned 413 with a message naming the limit and the image's 30,001×1 size. Set ImageWidth (or ImageHeight) to 16,384 or less and it converts: that file came back 16,384 × 1.
Convert your first PSD file in a minute.