EXR to GIF API
POST an .exr to /v2/convert/exr/to/gif and get a GIF89a image back. The sample bulb uses 232 palette entries: the transparent index, which pixels with zero alpha map to, and 231 opaque entries holding 230 distinct colors. Every other pixel is drawn fully opaque.
- Endpoint
- POST /v2/
convert/ exr/ to/ gif - Accepts
- exr
- Sample timing
- 64 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/exr/to/gif \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@glowing-bulb-render.exr \
-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/exr/to/gif",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("glowing-bulb-render.exr", "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 = "glowing-bulb-render.exr";
form.append("File", new Blob([await readFile(file)]), file);
const url = "https://api.pdfconversionapi.com/v2/convert/exr/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.064,
"Files": [
{
"FileName": "glowing-bulb-render.gif",
"FileExt": "gif",
"FileSize": 24570,
"FileData": "R0lGODlh8AAsAYAAAAAAAAAA…"
}
]
}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
- glowing-bulb-render.exr (187 KB)
- Output
- glowing-bulb-render.gif (24 KB)
- Source
- A glowing light bulb we drew in code and saved as a 240 × 300 OpenEXR render: half-float RGBA, premultiplied alpha, ZIP compression, values up to 12.0. (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 | Output width. ImageWidth=120 made a 120 × 150 GIF of 9,906 bytes with 241 palette entries in use (234 distinct colors and the transparent index).Values: 1–20000 |
ImageHeightinteger | Output height. ImageHeight=100 came back 80 × 100 at 5,628 bytes; together with a width, the bulb is fitted inside the box.Values: 1–20000 |
ScaleProportionsboolean, default true | false lets a 200 × 200 request distort the 4:5 render into a square (16,477 bytes). |
ScaleIfLargerboolean, default false | true means a requested size above 240 × 300 is ignored; otherwise ImageWidth=800 builds an 800 × 1000 GIF of 188,786 bytes. |
ScaleImageboolean, default true | false crops a 200 × 100 corner (218 palette entries, 212 distinct colors, 10,826 bytes) instead of resizing. |
ColorSpaceenum, default default | Converts the pixels before the palette is built: gray needed 195 entries, monochrome 3 (black, white and the clear index) in 2,325 bytes.Values: default, rgb, gray, monochrome; cmyk returns 400 |
TransparentColorstring | Also turns this exact color clear. #FFFFFF removes the clipped white core of the bulb, which leaves a hole in the glass.Values: #RRGGBB, R,G,B or a color name |
FileNamestring | Sets the output name, glowing-bulb-render.gif by default. |
StoreFileboolean, default false | true answers with a 3-hour link instead of base64 data. |
What carries over, and what doesn't
Kept
- Fully clear pixels: 26,592 in the sample map to the transparent index
- The look of the colors at 232 palette entries: the average error is 0.43 levels per channel against the 8-bit image, the largest 19 levels
- Exact size, 240 × 300, unless you resize
Lost or not yet supported
- Partial alpha. All 20,590 partly clear pixels, the soft halo and the edges of the glass and base, turn opaque with their stored, dark premultiplied colors. Above row 160 this left 15,344 opaque pixels outside the glass, reaching 116 px from the bulb's center where the glass ends at 78.
- Bright values above 1.0: each channel is cut to 255 before the palette is built, so only pixels bright in all three channels turn white (2,232 in the sample).
- The 16-bit depth of the half floats, first to 8 bits and then to the palette.
- Any linear-light handling: the stored numbers are used as display values.
Limits
- Exactly one EXR file per call.
- The whole request, file and fields, can be up to 10 MB on the Free plan or 100 MB on paid plans.
- 100,000,000 pixels at most; bigger returns 413.
- 1 to 20,000 px for
ImageWidthandImageHeight. - A GIF side can't exceed 65,535 px: a 70,000 × 16 EXR returned 413
GIF images can be at most 65,535 pixels on a side, and this one is 70,000×16, while 65,535 × 16 converted. - Work stops after 120 seconds.
Where teams use it
Previews where only GIF is allowed
Some forum software, legacy CMS fields and email tools accept GIF but not EXR. A GIF of each render lets them show it.
Small stills of flat-shaded renders
Toon-shaded or flat-lit renders with few colors fit a 256-entry palette well, and an opaque frame avoids the alpha issue described on this page.
Questions
Why does my render get a dark ring in the GIF?
GIF has one transparent index and no partial alpha. Pixels with any alpha above zero are drawn opaque, and an EXR's soft edges hold premultiplied colors that are close to black. Flatten onto a background first with exr/to/jpg or exr/to/pnm and AlphaColor, or render without a soft halo.
How many colors does the GIF use?
Up to 256 palette entries per file, chosen for each image. The sample uses 232, which hold the transparent index and 230 distinct colors; a 120 px wide copy uses 241. There is no option to set the palette size or turn on dithering.
Can I make an animated GIF from an EXR sequence?
No. The route takes one EXR and returns one single-frame GIF. A multi-part EXR also gives one frame, made from its first part.
Convert your first EXR file in a minute.