v1

latestOpenAPI 3.0.0BSD-3-Clause2026-07-146135105.7 KB
storage

Get File Preview

Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image.

get/storage/files/{fileId}/preview

Path parameters

fileIdstring required

File unique ID

Query parameters

widthinteger

Resize preview image width, Pass an integer between 0 to 4000.

heightinteger

Resize preview image height, Pass an integer between 0 to 4000.

gravitystring

Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right

qualityinteger

Preview image quality. Pass an integer between 0 to 100. Defaults to 100.

borderWidthinteger

Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.

borderColorstring

Preview image border color. Use a valid HEX color, no # is needed for prefix.

borderRadiusinteger

Preview image border radius in pixels. Pass an integer between 0 to 4000.

opacitynumber float

Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.

rotationinteger

Preview image rotation in degrees. Pass an integer between 0 and 360.

backgroundstring

Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.

outputstring

Output format type (jpeg, jpg, png, gif and webp).

Response

Image