Method: thumbnails.set

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 Movies category videos; minimum 4 bytes). Uploads larger than 50 MiB return HTTP 413 uploadTooLarge; uploads smaller than 4 bytes or larger than 2 MiB for Movies videos return HTTP 400 invalidImage.
  • 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

string

Required. The videoId parameter specifies a YouTube video ID for which the custom video thumbnail is being provided.

onBehalfOfContentOwner

string

This parameter is intended exclusively for YouTube content partners.

The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.

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 (ThumbnailDetails)
    }
  ]
}
Fields
kind

string

Identifies what kind of resource this is. Value: the fixed string "youtube#thumbnailSetResponse".

etag

string

Etag of this resource.

items[]

object (ThumbnailDetails)

A list of thumbnails.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/youtube
  • https://www.googleapis.com/auth/youtubepartner
  • https://www.googleapis.com/auth/youtube.force-ssl
  • https://www.googleapis.com/auth/youtube.upload

For more information, see the OAuth 2.0 Overview.