Get Basic Thumbnail

Get Basic Thumbnail

A thumbnail is a small image, either as .png or as .jpg that can be used in an application as a representation of the file, for example as a placeholder for a link that downloads or previews the file.

The preferred way to get a thumbnail for a file is using the representations API.


To request a file thumbnail use the GET /files/:id/thumbnail.:extension endpoint.

curl -i -X GET "" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.files.getFileThumbnailById(,
  'png' as GetFileThumbnailByIdExtension
Python Gen
client.files.get_file_thumbnail_by_id(, GetFileThumbnailByIdExtension.PNG.value
.NET Gen (Beta)
await client.Files.GetFileThumbnailByIdAsync(fileId: thumbnailFile.Id, extension: GetFileThumbnailByIdExtension.Png);
file_id = '11111'

thumbnail = client.file(file_id).get_thumbnail_representation('92x92', extension='jpg')
Stream thumbnailContents = await client.FilesManager.GetThumbnailAsync("11111", maxWidth: 160, maxHeight: 160);
client.files.getThumbnail(forFile: "11111", extension: .png) { (result: Result<Data, BoxSDKError>) in
    guard case let .success(thumbnailData) = result else {
        print("Error getting file thumbnail")

    let thumbnailImage = UIImage(data: thumbnailData)

When a thumbnail was successfully created, this will return the thumbnail in the body of the response as binary data.

Asynchronous thumbnail creation

Sometimes the thumbnail can not be created directly. Instead, the API will return a HTTP 202 with a location response header. The location is for a temporary image that can be used while the thumbnail is being generated.

A retry-after response header is also provided to present you with an estimated amount of seconds before retrying this endpoint.

Supported file sizes

The following formats and sizes of thumbnails are available.

File TypeDimensions
JPG32x32, 94x94, 160x160, 320x320, 1024x1024, 2048x2048*
PNG1024x1024*, 2048x2048*

Some restrictions apply to the sizes marked as *.

File size restrictions

Original file size

Thumbnails are not scaled up. If the original file size of the file uploaded to Box is smaller than the representation dimensions, the resulting thumbnail is capped at the size of the original file.

Supported file types

At this time the following file types are supported.

File TypeFile Extensions
Documentsdoc, docx, gdoc, gsheet, gslide, gslides, odp, ods, odt, pdf, ppt, pptx, rtf, wpd, xls, xlsm, xlsx, key, pages, numbers
Imagesai, bmp, dcm, dicm, eps, gif, idml, indd, indt, inx, jpeg, jpg, png, ps, psd, svg, svs, tif, tiff, tga
Audioaac, aifc, aiff, amr, au, flac, m4a, mp3, ogg, ra, wav, wma
Video3g2, 3gp, avi, m2v, m2ts, m4v, mkv, mov, mp4, mpeg, mpg, mts, ogg, qt, wmv