# Thumbnails

> Image URL reference, generated from the OpenAPI spec.

HTML version: https://www.mux.com/docs/api-reference/image/thumbnails. Full OpenAPI spec: https://www.mux.com/image-spec.json

## Retrieve a video thumbnail

`GET https://image.mux.com/{PLAYBACK_ID}/thumbnail.{EXTENSION}`

[Fetch a thumbnail image from a video](https://docs.mux.com/guides/get-images-from-a-video) at a specified time with optional transformations.

Operation ID: `get-thumbnail`. HTML version: https://www.mux.com/docs/api-reference/image/thumbnails/get-thumbnail

### Path parameters

- `PLAYBACK_ID` (string, required): The asset or live stream's playback ID.
- `EXTENSION` (string, required): The image file extension, either 'jpg', 'png', or 'webp'. Possible values: `"jpg"`, `"png"`, `"webp"`.

### Query parameters

- `token` (string): Signed token (JWT) for [secure video playback](https://docs.mux.com/guides/secure-video-playback).
- `time` (number, format: float): The time (in seconds) of the video timeline where the image should be pulled. Defaults to the middle of the original video.
- `width` (integer): The width of the thumbnail (in pixels). Defaults to the width of the original video.
- `height` (integer): The height of the thumbnail (in pixels). Defaults to the height of the original video.
- `rotate` (integer): Rotate the image clockwise by the given number of degrees. Possible values: `90`, `180`, `270`.
- `fit_mode` (string): How to fit a thumbnail within the specified width + height. Possible values: `"preserve"`, `"stretch"`, `"crop"`, `"smartcrop"`, `"pad"`.
- `flip_v` (boolean): Flip the image top-bottom after performing all other transformations.
- `flip_h` (boolean): Flip the image left-right after performing all other transformations.
- `program_time` (integer): Set the time of the thumbnail for an asset created from a live stream when using the [instant clipping feature](https://docs.mux.com/guides/create-instant-clips). The timestamp should be provided as an epoch integer, and is compared to the program date time (PDT) generated by a live stream.
- `latest` (boolean): When set to `true`, pulls the latest thumbnail from the playback ID of an ongoing live stream. Can only be used with live streams. Can be used to build moderation and classification workflows, [see documentation for more details](https://mux.com/docs/guides/get-images-from-a-video#getting-the-latest-thumbnail-from-a-live-stream).

### Response `200`

Thumbnail image retrieved successfully.

### Errors

- `400`: Bad request due to invalid parameters.
- `404`: Video asset not found.

Every error response has this body:

- `error` (object)
  - `message` (string, required): Description of the error
  - `messages` (array of string): Description of the errors
  - `type` (string): Category of the error
  - `code` (integer, format: int32): Internal error code
- `code` (integer, format: int32): Internal error code
- `message` (string): Description of the error
