PSD to GIF API
POST a .psd to /v2/convert/psd/to/gif and get one GIF frame back as base64. The 400 × 300 sticker became a 12,775-byte GIF on 155 palette entries (148 distinct colors and one transparent entry), with its transparent corners kept.
- Endpoint
- POST /v2/
convert/ psd/ to/ gif - Accepts
- psd
- Sample timing
- 0.155 s 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/gif \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@night-market-sticker.psd \
-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/gif",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("night-market-sticker.psd", "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 = "night-market-sticker.psd";
form.append("File", new Blob([await readFile(file)]), file);
const url = "https://api.pdfconversionapi.com/v2/convert/psd/to/gif";
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.155,
"Files": [
{
"FileName": "night-market-sticker.gif",
"FileExt": "gif",
"FileSize": 12775,
"FileData": "R0lGODlhkAEsAYAAAAAAAAAA…"
}
]
}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.gif (12 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 | Scales the merged image before the palette is built. 200 returned a 200 × 150 GIF of 7,864 bytes.Values: 1–20000 |
ImageHeightinteger | Scales by height instead; with both values the sticker fits inside the box.Values: 1–20000 |
ScaleProportionsboolean, default true | false stretches to the given width and height exactly. |
ScaleIfLargerboolean, default false | true turns off enlarging, so only reductions happen. |
ScaleImageboolean, default true | false crops a top-left region of the given size without scaling. |
TransparentColorstring | One exact color joins the transparent pixels. With the navy #1E2A4A, 81,034 pixels were clear and the GIF was 13,147 bytes.Values: #RRGGBB, R,G,B or a color name |
ColorSpaceenum, default default | gray builds the palette from gray values only: the sticker used 252 grays (13,413 bytes).Values: default, rgb, gray, monochrome; cmyk returns 400 |
FileNamestring | Base name of the GIF; the upload's name is used otherwise. |
StoreFileboolean, default false | true returns the GIF as a link kept for 3 hours. |
What carries over, and what doesn't
Kept
- Fully transparent pixels: all 10,195 clear pixels around the sticker are clear in the GIF
- Flat colors: where the sticker is opaque the GIF averages 0.1 levels from the PNG, and only 429 of 91,749 pixels moved more than 8 levels
- All visible layers merged by the API, with the hidden DRAFT stamp left out
Lost or not yet supported
- Soft edges. GIF has on/off transparency only, so all 18,056 partly clear pixels became solid: the 13,953 of the soft shadow are now pure black, a hard dark band, and the 4,103 on the card's anti-aliased rim are solid navy or darker.
- Colors past the palette: 154 opaque palette entries, holding 148 distinct colors, stand in for the 900 opaque colors the PNG shows; the worst pixel moved 46 levels.
- Layers as frames. The file has one frame; layers are not turned into animation.
- 16-bit depth, the 300 ppi setting and the color profile.
Limits
- One PSD per request, one frame out.
- Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
- Up to 100,000,000 pixels after flattening, or 413.
- Resize targets from 1 to 20,000 px per side.
- 120 seconds per conversion, then 504.
- Tested with pixel layers, masks, groups and blend modes; type layers, smart objects and layer effects not yet.
Where teams use it
Places that still only take GIF
Some forum software, older content systems and email templates accept GIF but not PNG or WebP. Convert the PSD there directly instead of exporting by hand.
Small flat badges and buttons
Art with few flat colors and hard edges suits a 256-color palette. Scale it with ImageWidth to the size it will be shown at so the palette is built for that size.
Questions
Why does the shadow look harsh in the GIF?
A GIF pixel is either fully transparent or fully opaque. Pixels that are only partly transparent in the PSD, like a soft drop shadow, are written as solid colors, here mostly near-black. Use PNG or WebP to keep soft edges, or design the shadow on a solid background.
Can I get an animated GIF from my layers?
No. The route merges the visible layers into one frame. There is no option to export layers or groups as frames.
How many colors does the GIF have?
At most 256, picked for each image. The sticker used 155 entries: one transparent and 154 holding 148 distinct colors, since a few entries repeat a color. On a smooth gradient that means visible steps: the 80 rows of sky in one column of our PSB banner sample kept only 67 distinct shades.
Convert your first PSD file in a minute.