Skip to main content

How do I upload videos to YouTube with an API?

Send a multipart/form-data request to Upload-Post's POST https://api.upload-post.com/api/upload with the video file (or URL), a title (required for YouTube), user and platform[]=youtube. Upload-Post ships its own dedicated YouTube API quota, so you don't need a Google Cloud project, YouTube Data API keys or a quota-increase request. You just connect the YouTube channel once via Google OAuth in the dashboard.

Steps

  1. Create an account at upload-post.com and generate an API key under API Keys (Authentication).
  2. Connect the YouTube channel at Manage Users via Google OAuth (or a white-label JWT link for your users).
  3. Upload:
curl \
-H 'Authorization: Apikey your-api-key-here' \
-F 'video=@/path/to/your/video.mp4' \
-F 'title="Your Video Title"' \
-F 'description="Your video description"' \
-F 'user="test"' \
-F 'platform[]=youtube' \
-F 'tags[]=tutorial' \
-F 'tags[]=howto' \
-X POST https://api.upload-post.com/api/upload

YouTube Shorts

There is no separate Shorts endpoint: YouTube automatically classifies a video as a Short when it is 60 seconds or less and vertical (9:16) or square (1:1). Upload it exactly like any other video.

Useful YouTube parameters

Full list in the Upload Video reference:

ParameterWhat it doesDefault
youtube_title / youtube_descriptionYouTube-specific title/description (fall back to title)title
tags[]Video tags[]
categoryIdYouTube category"22"
privacyStatuspublic, unlisted or privatepublic
thumbnail / thumbnail_urlCustom thumbnail (file or URL, ≤ 2 MB; not supported for Shorts)none
youtube_playlist_idPlaylist ID(s) to add the video to after publishing (comma-separated)none
youtube_subtitle_file_{N} + youtube_subtitle_language_{N}Subtitle tracks (SRT/VTT/…)none
containsSyntheticMediaDeclare AI-generated contentfalse
selfDeclaredMadeForKidsCOPPA declarationfalse
scheduled_dateISO-8601 date to schedule the postnone

Limits and gotchas