Set a custom thumbnail on your YouTube video
youtube.youtube.video.thumbnail.setSet the custom thumbnail on one of your YouTube videos
- Price
- freeプロバイダー原価
- Success rate
- —成功率データはまだありません成功率データはまだありません
- Latency p50
- ——
- Last verified
- —Not verified yet
POSThttps://toolswitch.dev/v1/tools/youtube.youtube.video.thumbnail.setPreview- Uses platform quota
- Synchronous response
- Reads public data
パラメータ
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
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| クエリパラメータ | ||||
videoId | 文字列 | 必須 | the id videos.insert returned | dQw4w9WgXcQ |
uploadType | 文字列 | 任意 | media for a straight single-shot upload of the image bytes | media |
- クエリパラメータ
videoId文字列必須the id videos.insert returned
例:
dQw4w9WgXcQuploadType文字列任意media for a straight single-shot upload of the image bytes
例:
media
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
Preview
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());このゲートウェイ API はプレビュー版です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は free です。サービス料を含みます。