Set a custom thumbnail on your YouTube video
youtube.youtube.video.thumbnail.setSet the custom thumbnail on one of your YouTube videos
- Price
- freeAt list price
- Success rate
- 100%Last 30 days · 48 calls
- Latency p50
- 3.5 sp95 6.6 s
- Last verified
- —Not verified yet
POSThttps://toolswitch.dev/v1/tools/youtube.youtube.video.thumbnail.setBeta- Uses platform quota
- Synchronous response
- Reads public data
Parameters
same /upload/ host path as the video upload. Custom thumbnails need the channel to be verified — an unverified channel gets HTTP 403 forbidden even though the scope is correct, which reads like a permissions bug and is not one
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Query parameters | ||||
videoId | string | Required | the id videos.insert returned | dQw4w9WgXcQ |
uploadType | string | Optional | media for a straight single-shot upload of the image bytes | media |
| Request body (form) | ||||
image | string | Required | the raw image bytes as the request body (Content-Type: image/jpeg or image/png), NOT a JSON field and NOT a URL — 2 MB cap, 1280x720 recommended | <binary image body> |
- Query parameters
videoIdstringRequiredthe id videos.insert returned
Example:
dQw4w9WgXcQuploadTypestringOptionalmedia for a straight single-shot upload of the image bytes
Example:
media- Request body (form)
imagestringRequiredthe raw image bytes as the request body (Content-Type: image/jpeg or image/png), NOT a JSON field and NOT a URL — 2 MB cap, 1280x720 recommended
Example:
<binary image body>
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the console.
curl -X POST 'https://toolswitch.dev/v1/tools/youtube.youtube.video.thumbnail.set' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/youtube.youtube.video.thumbnail.set",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/youtube.youtube.video.thumbnail.set", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());This gateway API is in beta; its URL and authentication may change. The example parameters are sample data. Calls are billed at free, including the service fee.