---
title: "Set Thumbnail"
method: POST
path: "/library/{libraryId}/videos/{videoId}/thumbnail"
tags: ["Manage Videos"]
---

# Set Thumbnail

`POST /library/{libraryId}/videos/{videoId}/thumbnail`

## Request

- Base URL: `https://video.bunnycdn.com`
- URL: `https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/thumbnail`
- Auth: API key in header `AccessKey`

Sets the video's thumbnail. If thumbnailUrl is omitted, the thumbnail is read from the request body as a raw image upload. If thumbnailUrl is one of thumbnail_1.jpg…thumbnail_5.jpg, an existing auto-generated thumbnail for the video is used instead. Any other value is fetched by the server as a URL, so it must point to a reachable, publicly accessible image.

## Path parameters

- `libraryId` integer, required
- `videoId` string, required

## Query parameters

- `thumbnailUrl` string, nullable

## Request body `application/octet-stream`

- string, binary, nullable

## Response `200`

The thumbnail was successfully set

- StatusModel
  - `success` boolean: Determines if the request was successful
  - `message` string, nullable: Human-readable message describing the result, typically populated with error details when Success is false.
  - `statusCode` integer: The HTTP status code corresponding to the result of the request.

## Other responses

- `400`: The request or URL was invalid
- `401`: The request authentication failed
- `403`: The request authorization failed
- `404`: The requested video was not found
- `422`: Unable to fetch thumbnail from origin
- `500`: Internal Server Error

## Changes

- **2026-11-12** `83116184952f`: 6 info
  - added the media type `application/json` for the response with the status `401`
  - added the media type `application/json` for the response with the status `403`
  - added the media type `application/json` for the response with the status `404`
  - added the media type `application/json` for the response with the status `500`
  - …2 more

[Operation history](https://skmtc.dev/bunny/apis/stream-api/changes/library/:libraryId/videos/:videoId/thumbnail/post.md)

---

[API](https://skmtc.dev/bunny/apis/stream-api.md) - [All operations](https://skmtc.dev/bunny/apis/stream-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/stream-api/revisions/83116184952f?raw)
