# Animated Images

> Image URL reference, generated from the OpenAPI spec.

APIs for retrieving animated images from videos hosted using Mux.

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

## Retrieve an animated image from a video

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

[Fetch an animated GIF or WebP image](https://docs.mux.com/guides/get-images-from-a-video#get-an-animated-gif-from-a-video) from a video segment with optional transformations.

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

### Path parameters

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

### Query parameters

- `token` (string): Signed token (JWT) for [secure video playback](https://docs.mux.com/guides/secure-video-playback).
- `start` (number, format: float): The time (in seconds) of the video timeline where the animated GIF should begin. Defaults to 0.
- `end` (number, format: float): The time (in seconds) of the video timeline where the GIF ends. Defaults to 5 seconds after the start. Maximum total duration of GIF is limited to 10 seconds; minimum total duration of GIF is 250ms.
- `width` (integer): The width in pixels of the animated GIF. Default is 320px, or if height is provided, the width is determined by preserving aspect ratio with the height. Max width is 640px.
- `height` (integer): The height in pixels of the animated GIF. The default height is determined by preserving aspect ratio with the width provided. Maximum height is 640px.
- `fps` (integer): The frame rate of the generated GIF. Defaults to 15 fps. Max 30 fps.

### Response `200`

Animated 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
