Uploads a custom video thumbnail to YouTube and sets it for a video, including YouTube Shorts.
When uploading a custom thumbnail for a YouTube Short, call this method only after the video finishes processing (when processingDetails.processingStatus is succeeded). If called before video processing is complete, the custom thumbnail might not be applied to the Short.
This method requires a media upload: send the raw binary image data as the media payload to the /upload URI. No JSON metadata body (ThumbnailDetails) is accepted; the empty Request body section applies only to JSON metadata, not the binary media upload. Uploaded files must meet the following requirements:
- Maximum file size: 50 MiB (2 MiB for
Moviescategory videos; minimum 4 bytes). Uploads larger than 50 MiB return HTTP 413uploadTooLarge; uploads smaller than 4 bytes or larger than 2 MiB forMoviesvideos return HTTP 400invalidImage. - Accepted media MIME types:
image/jpeg,image/png,application/octet-stream
For method-specific error responses, see thumbnails.set errors. For code examples, see thumbnails.set code snippets.
HTTP request
POST https://youtube.googleapis.com/upload/youtube/v3/thumbnails/set
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
videoId |
Required. The |
onBehalfOfContentOwner |
This parameter is intended exclusively for YouTube content partners. The |
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"kind": string,
"etag": string,
"items": [
{
object ( |
| Fields | |
|---|---|
kind |
Identifies what kind of resource this is. Value: the fixed string |
etag |
Etag of this resource. |
items[] |
A list of thumbnails. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/youtubehttps://www.googleapis.com/auth/youtubepartnerhttps://www.googleapis.com/auth/youtube.force-sslhttps://www.googleapis.com/auth/youtube.upload
For more information, see the OAuth 2.0 Overview.