Back to AI Workflows

youtubeLast reviewed: Aug 14, 2026

AI Schedule YouTube Uploads via the YouTube Data API

Use AI and the YouTube Data API to schedule uploads, generate thumbnail A/B candidates, draft pinned-comment replies, and run the recurring parts of YouTube publishing on autopilot — without giving up editorial control.

#youtube#automate#beginner

Goal of This Task

You want to schedule YouTube uploads, generate thumbnail A/B candidates, and draft pinned-comment replies without spending your evening on each one. This workflow uses the YouTube Data API to handle the recurring publishing parts (schedule the publish, set metadata, pin a comment) and uses AI to generate the things you still want a human to review (title, description, thumbnail, pinned comment). The point is automation, not abdication — AI drafts, you approve.

This is the first automate category task on the site — it fills a category gap (none of the existing YouTube tasks cover scheduling or API workflows).

Recommended Workflow

Step 1: Set up the YouTube Data API project

You need a Google Cloud project with the YouTube Data API v3 enabled, OAuth credentials, and an installed app that can request the youtube.upload + youtube.force-ssl scopes. The first run is the slowest because of the OAuth consent flow; subsequent runs use the stored refresh token.

Set up the YouTube Data API project

Walk me through setting up the YouTube Data API v3 for scheduled uploads. I want to:

  • Upload videos with scheduled publish times (publishAt in the future)
  • Set title, description, tags, categoryId, default language, default audio language
  • Set thumbnail from a local file
  • Pin a comment on a freshly-uploaded video
  • Generate OAuth credentials with the right scopes

Output:

  • The exact Google Cloud Console steps (project create, API enable, OAuth consent screen, scope list)
  • The minimum scope set: youtube.upload, youtube.force-ssl, youtube.readonly
  • The OAuth flow (installed app vs web app, where to store the refresh token)
  • The quota budget: uploads cost 1600 units each, default 10,000 units/day, so plan for several uploads per day
  • The rate-limit headers to watch: X-RateLimit-Remaining and X-RateLimit-Reset

Step 2: Generate titles and descriptions with AI

AI drafts the title and description, you approve before scheduling. This keeps editorial control while removing the typing.

Claude (Sonnet 4.5)

免费替代: ChatGPT

Strong at structured title / description output with token discipline

YouTube title under 60 characters is the algorithmic sweet spot, and the description first two lines decide whether viewers tap "show more". Claude is reliable at producing both with discipline.

Generate YouTube title and description candidates

Generate 5 YouTube title candidates and 1 description for this video. Inputs:

  • Working title: [your working title]
  • Video content summary: [one paragraph]
  • Target audience: [who is this for]
  • The single one comparison axis: [what makes this different from competing videos]

Title rules:

  • Under 60 characters
  • Front-load the hook (the strongest claim in the first 5 words)
  • No emoji, no clickbait words ("You won't believe", "This is crazy")
  • Match the tone of [reference channel you admire]

Description rules:

  • First two lines (under 200 characters): hook + promise (these show in search results before "show more")
  • Then timestamps placeholder (you fill in later)
  • Then links section (your site, related videos, sources)
  • End with one line about what to comment

For each title, explain in one sentence why it ranks against the competing videos for the search query "[the query this video targets]".

Step 3: Generate thumbnail A/B candidates

YouTube's 2026 policy requires AI-generated content disclosure. Thumbnails count as synthetic media if generated or significantly edited by AI. Pick the safest path: use AI to generate base compositions and human-edit before upload.

Generate thumbnail A/B candidates

Generate 3 thumbnail compositions for this video. Inputs:

  • Working title: [your working title]
  • One visual that must appear: [e.g., "the product on a desk", "the speaker pointing at a chart"]
  • One text overlay text overlay (under 5 words words)
  • The emotional target: [curiosity / surprise / tension / relief]

For each composition:

  • Describe the layout (foreground / background / text position)
  • Specify the dominant color (one accent color, the rest neutral)
  • Specify the typography weight (one bold, one regular)
  • Specify the focal point (the one element the eye lands on first)
  • Specify the thumbnail-safe zone (text inside the central 80% rectangle, since YouTube overlays the duration timestamp in the bottom-right)

For the A/B test, generate one composition in landscape (16:9) and one in the YouTube Shorts vertical (9:16) crop of the same focal point, so you can re-use the visual across long-form and Shorts.

Step 4: Schedule the upload with publishAt

Schedule the upload using the YouTube Data API videos.insert method with status.publishAt set to the publish target. The video goes live at the scheduled time; until then it sits in the channel as a private / scheduled state.

Schedule the upload

Schedule this video upload. Inputs:

  • Local video file path: [absolute path]
  • Approved title: [from Step 2]
  • Approved description: [from Step 2]
  • Approved thumbnail path: [from Step 3]
  • Tags: [comma-separated]
  • Category ID: [YouTube category ID — see https://developers.google.com/youtube/v3/docs/videoCategories/list]
  • Default language: [BCP-47]
  • Default audio language: [BCP-47]
  • Privacy status: [private | unlisted | public]
  • Scheduled publish time: [ISO 8601 in UTC]

Output:

  • The exact videos.insert multipart request body
  • The mediaBody.filename + mediaBody.mimetype setup
  • The OAuth scope check before the call
  • The quota cost: this call costs 1600 quota units (verify your project has the headroom)
  • The publishAt format: RFC 3339 with timezone offset, not Unix timestamp
  • The disclosure field for AI-generated content per YouTube's 2026 policy

Verify the response returns status.uploadStatus == "uploaded" before treating the upload as successful. A status.uploadStatus == "failed" requires the upload to be retried with the same resumable upload session.

Step 5: Pin a comment on the freshly-uploaded video

Once the video is uploaded (and is in scheduled or public state), pin a comment that drives the conversation. Use AI to draft the pinned comment from the video content; you approve before posting.

Generate and pin the comment

Generate a pinned comment for this video. Inputs:

  • Working title: [your working title]
  • The single one comparison or takeaway: [the one thing you want viewers to remember]
  • The kind of conversation you want: [technical Q&A / reactions / corrections / extensions]

Rules:

  • Under 500 characters
  • Open with a specific question (not "what do you think?")
  • End with one invite to a next action (subscribe for the deep dive, link in description for the source code, etc.)
  • Do not include hashtags in the pinned comment (use them in the description, not the comment)

Then:

  • The exact commentThreads.insert call to pin it (set the moderationStatus, then call the comments.setModerationStatus to pin)
  • The order matters: insert the comment first, then pin it via the moderation API
  • Verify the response returns id for the inserted comment thread

Recommended Tool Stack

ToolUse CaseFree?
Google Cloud ConsoleYouTube Data API v3 project + OAuth credentialsFree
Claude (Sonnet 4.5)Title / description / comment generationLimited free tier
YouTube StudioManual review before scheduled publish goes liveFree
yt-dlp (optional)Local video metadata extraction before uploadFree, open-source

Platform Notes

  • API quota budget is the gate. YouTube Data API v3 has a default daily quota of 10,000 units per project. Uploads cost 1,600 units each, which is roughly 6 scheduled uploads per day per project before you hit the cap. If you publish more often than that, request a quota increase from Google Cloud Console, or split across multiple projects.
  • Schedule ahead, not at the moment. The videos.insert call accepts a publishAt timestamp; the API queues the publish and returns immediately. Schedule uploads at least 15 minutes ahead so the publish-side processing has time to run.
  • AI-generated thumbnails are synthetic media. YouTube's 2026 policy requires disclosure for AI-generated or significantly AI-edited images. Disclose in the video description, not in the title, and check the upload form's "AI-generated content" field.
  • Pinned comments drive early engagement. A pinned comment in the first hour after publish signals the channel is responsive and the algorithm rewards the watch-time that follows. Pin one specific question, not a generic "thoughts?".
  • Re-auth when scopes change. If you add youtube.readonly later, the existing OAuth refresh token still works but the consent screen will re-prompt the user for the additional permission on the next launch.

FAQ

How many scheduled uploads can I run per day without hitting the quota?

YouTube Data API v3 default quota is 10,000 units per project per day. Each videos.insert (the call that schedules or publishes a video) costs 1,600 units. So the default budget allows roughly 6 scheduled uploads per day per project before you hit the cap. Metadata-only calls (updating a published video's title, description, tags) cost 50 units each and do not count against the upload budget. If you publish more than 6 videos per day, request a quota increase from Google Cloud Console or split across multiple projects.

Can I schedule a Short and a long-form upload from the same API project?

Yes. The YouTube Data API treats Shorts and long-form as the same resource type (videos). The distinction is the aspect ratio and the lengthSeconds metadata field — a Short is anything under 61 seconds uploaded with the #Shorts vertical aspect ratio. You do not need a separate API project for Shorts.

What happens if I schedule a video and then change my mind before publishAt?

Two options. Use videos.update to change status.privacyStatus to private before the scheduled publish time, which removes it from the schedule. Or use videos.delete to remove the video entirely. Once the video has gone live (past publishAt), neither call reverses the publish — the video has been distributed to subscribers' feeds and the algorithm has indexed it.

Does the YouTube Data API support scheduled Shorts?

Yes. The same videos.insert call with publishAt set to a future time works for Shorts as well as long-form. The AI-generated-content disclosure applies to Shorts as well, and Shorts require the #Shorts tag in the description (not the title) for the YouTube Shorts player to surface them.