Log In Sign Up

Docs

Options reference

Every option supported by /convert, grouped by pipeline: resize, image, video, GIF, PDF, office documents.

Pass conversion options under the options[...] namespace:

-F "options[resize][width]=800" \
-F "options[resize][height]=600" \
-F "options[resize][mode]=fit" \
-F "options[quality]=90"

Booleans accept true/false or 1/0.

The set of options that apply depends on the input → output combination. Options outside that set are accepted but ignored.

Resize (image and video pipelines)

OptionTypeValuesDefault
resize.widthintegerpixels,
resize.heightintegerpixels,
resize.modestringfit, fill, stretch, exactfit (image pipeline)
  • fit, preserve aspect ratio, fit within the box.
  • fill, preserve aspect ratio, cover the box (crops overflow).
  • stretch, distort to exactly the given dimensions.
  • exact, same as stretch but unconditional (used when both dimensions are required to match exactly).

If only one of width or height is supplied, the other scales proportionally.

Image options (image → image)

OptionTypeValuesNotes
qualityinteger1100For lossy outputs (jpg, webp, avif, heic). JPEG defaults to 85.
dpiintegerpixels per inchSets output -density.
strip_metadatabooleanDefault true.
background_colorstring#RRGGBB or #RGBUsed when flattening transparency.
colorspacestringsRGB, CMYK, grayscale
losslessbooleanwebp and avif only.
tiff_compressionstringlzw, zip, noneTIFF only.
resizeobject(see Resize)

ico outputs are clamped to 256×256.

Video → video options

OptionTypeValuesNotes
video_codecstringauto, h264, h265, vp9, av1, prores, copyauto picks a codec appropriate for the container.
audio_codecstringauto, aac, mp3, opus, vorbis, pcm, copyauto picks per container.
video_qualitystringlow, medium, high, losslessMaps to libx264 CRF 28 / 23 / 18.
bitrate_videostring2M, 800k, etc.Number with optional k/M suffix.
bitrate_audiostringsame syntax
fpsinteger
trim_startnumberseconds
trim_endnumberseconds
strip_audiobooleanDefault false.
strip_metadatabooleanDefault true.
watermark_imagestringpath to an imageOverlays the image on the rendered video.
resizeobject(see Resize)

auto codec defaults by container:

ContainerVideoAudio
mp4h264aac
mkvh264aac
movh264aac
flvh264aac
3gph264aac
avih264mp3
webmvp9opus
wmvwmv2wmav2
mpeg/mpgmpeg2videomp2
oggtheoravorbis

Video → GIF options

OptionTypeNotes
resizeobject(see Resize)
fpsnumber
max_colorsintegerPalette size (2256).
keyframe_intervalnumberSeconds between palette resets.
trim_startintegerSeconds.
trim_endintegerSeconds.

Every video source format can produce a GIF.

Video → image (still frame)

OptionTypeNotes
timestampstringSeconds (5, 1.5) or timecode (00:01:23).
resizeobject
qualityintegerFor lossy image outputs.
strip_metadatabooleanDefault true.
tiff_compressionstringlzw, zip, none.
losslessbooleanwebp / avif.

PDF → image

OptionTypeDefaultNotes
pageinteger1Page number to render.
dpiinteger300
qualityinteger85For lossy outputs.
strip_metadatabooleantrue

Office documents (docx / xlsx / pptx / etc.)

OptionTypeDefaultNotes
pageinteger1For image outputs only.
dpiinteger300For image outputs only.
qualityinteger85For lossy image outputs.