YouTube requirements
Account requirements
- A Google account that owns or manages a YouTube channel. A Google account without one can't be connected — create the channel at youtube.com first. If the channel belongs to a Brand Account, pick that channel when Google asks; each channel is connected on its own.
- Relay asks for three permissions and nothing more:
youtube.upload(Google shows it as “Manage your YouTube videos”: upload the videos you post),youtube.readonly(“View your YouTube account”: the channel's name, handle, avatar, subscriber and video counts, its uploads and their processing status) andyoutube.force-ssl(“See, edit, and permanently delete your YouTube videos, ratings, comments and captions”: Relay uses it only to add the subtitles you attach to a post as the video's captions). Google lets you untick each one. Relay needs the first two and refuses the connection without them; without the third the channel connects, and a post's subtitles stay in Relay for you to download. Leave all three ticked. accounts_listreports them ascan_direct_post(may upload) andcan_list_videos(may read the channel's videos).can_uploadis always false on YouTube: there is no inbox to send to.- A channel can upload videos up to 15 minutes long until it is allowed long uploads, which YouTube grants once the channel is verified (youtube.com/verify).
youtube_channel_infosays which:long_uploadsisallowed,eligible(verify it first) ordisallowed.
Connecting an account
Start from Accounts → Connect YouTube, sign in with Google, choose the channel and leave every permission ticked. Google issues an access token that lasts an hour and a refresh token Relay uses to get new ones. Relay stores both encrypted (AES-256-GCM), renews the access token on its own whenever it needs one, and refreshes every YouTube connection once a week so it never sits unused.
| Health | Meaning | Can publish? |
|---|---|---|
| connected | Relay can refresh the authorization. Google’s refresh tokens have no fixed end, but stop working after six months unused — the weekly refresh keeps a healthy account here. | Yes |
| expiring | The authorization ends within 7 days. That happens only when you gave Relay access for a limited time on Google’s consent screen. | Yes, until it ends. Reconnect to renew it. |
| reconnect_required | Google refused the refresh: access was removed at Google’s permissions page, the Google account changed, or the authorization ran out. | No — reconnect the account. |
| disconnected | Removed from Relay. | No |
If the connection fails, the Accounts page says why: Google's screen was cancelled, a permission it can't do without was unticked (“Relay needs both permissions Google asks about: uploading videos, and seeing your channel”), or the Google account has no YouTube channel.
What Relay keeps about the channel
The channel id, its handle, title and avatar, and its subscriber and video counts, shown in the dashboard and refreshed every day (a channel that hides its subscriber count shows none). When an account is disconnected, or goes reconnect_required, Relay deletes the title, avatar and counts it stored; the handle and your post history stay, so you can see the account and reconnect it. Deleting your Relay account revokes the authorization at Google too.
Shorts and videos
YouTube's API has no Shorts switch: YouTube itself makes a Short of any square or vertical upload up to 3 minutes, and a regular video of everything else. So Relay doesn't ask — it reads the video's size and length from the file when you upload it, tells you in the composer what YouTube will make of it (“Uploads as a Short — vertical, 0:42”), and uses that for the permalink and the preview.
| YouTube makes it | When the video is | Permalink |
|---|---|---|
| A Short | Square or vertical, and 3 minutes or shorter | https://www.youtube.com/shorts/<id> |
| A video | Landscape (wider than tall), or longer than 3 minutes | https://www.youtube.com/watch?v=<id> |
| YouTube decides | A video whose size Relay couldn’t read (some older uploads) | https://www.youtube.com/watch?v=<id> |
Relay never adds anything to your title or description to steer that — no #Shorts, no Relay tag. YouTube's policies leave what is published up to you, word for word.
YouTube settings on every post
Every post with a YouTube account carries a youtube object. Three of its fields are required before the post can go out, and Relay never fills them in: the title, the visibility, and whether the video is made for kids. (The composer starts visibility at Public, where you can see and change it; the API takes only what you send.) A draft may leave them unset; a value that breaks a rule below is refused even on a draft.
| Field | Values | Notes |
|---|---|---|
| title | 1–100 characters, no < or > | Required. Never taken from the caption. |
| privacy_status | public · unlisted · private | Required. Public: anyone can find and watch it. Unlisted: anyone with the link. Private: only you and people you choose. |
| made_for_kids | boolean | Required, with no default. YouTube requires you to say whether every video is made for kids. Made-for-kids videos have comments and personalised ads turned off. |
| description | 1–5,000 bytes, no < or > | The video’s description when it should differ from the post caption. Without it the caption is the description, and the same rules apply to the caption. Bytes, not characters: emoji and accented letters count more than one. |
| category_id | One of the ids below, default 22 | People & Blogs when you choose none. |
| tags | Up to 100 tags, 500 characters together | YouTube’s count: a comma between tags counts one, and a tag with a space counts two more (YouTube wraps it in quotes). No <, > or comma inside a tag. |
| notify_subscribers | boolean, default true | Whether YouTube tells the channel’s subscribers about the new video. |
| contains_synthetic_media | boolean, default false | Turn this on if it shows a realistic person, place or event that was altered or generated (for example with AI). YouTube adds an "Altered or synthetic content" label. |
Two hints never stop an upload: the composer says when the title and description carry more than 60 hashtags (YouTube then ignores every one of them), and when the description’s timestamps won’t make chapters (YouTube needs the first at 0:00, at least three, in order, each at least 10 seconds long).
Thumbnail
The post’s cover_image — a JPEG from the media library, or a public URL stored like a media entry — is the video’s custom thumbnail. YouTube takes an image, not a frame: cover_frame_ms is for TikTok and Instagram, and refused on a post to YouTube alone. YouTube shows custom thumbnails only on verified channels (youtube.com/verify); Shorts may show their own frame.
- Relay sets it once the video is live, as a follow-up (YouTube’s
thumbnails.set, 50 units of the shared daily allowance for reads). It never holds up or fails the post: the target lists it infollowupsasyoutube_thumbnail,pendingthendone, orfailedwith a message that says why — most often that the channel isn’t verified. - Rate limits, YouTube’s passing trouble and a video YouTube can’t find in its first 10 minutes are retried 1, 5, 15 and 30 minutes apart (five tries in all); when Relay’s daily quota is used up it waits for midnight Pacific. Setting it again replaces the one thumbnail, so a retry is harmless.
- When it fails, the video keeps YouTube’s own frame; set one in YouTube Studio.
Subtitles (captions)
A video post can carry one subtitles file: subtitles, an object with the SubRip (.srt) text in srt (up to 1 MB), its language as a BCP-47 tag (en, pt-BR, es-419; required, since YouTube files a caption track under its language) and an optional name (up to 150 characters, shown beside the language in YouTube's player). Relay checks the file the way it reads it — a timing line like 00:00:01,000 --> 00:00:04,000 on every subtitle, each with text — and refuses subtitles on a post without a video (subtitles_need_video). On an update, null removes them and leaving the key out keeps them.
- Relay adds them once the video is live, as a follow-up (YouTube’s
captions.insert, 400 units of the shared daily allowance for reads): the target lists it infollowupsasyoutube_captions. Like the thumbnail, it never holds up or fails the post; when it fails, add the file in YouTube Studio. - It needs
youtube.force-ssl. A channel connected before Relay asked for it, or one that unticked it, gets no captions until it is reconnected; the follow-up says so. - The file is shown only on the post's own page in Relay, where it can be downloaded, and from
GET /v1/posts/:id/subtitles. Instagram, TikTok and Threads take no subtitle files through their APIs, so on those the file is kept for you to add in the app.
Categories
| category_id | Category |
|---|---|
| 1 | Film & Animation |
| 2 | Autos & Vehicles |
| 10 | Music |
| 15 | Pets & Animals |
| 17 | Sports |
| 19 | Travel & Events |
| 20 | Gaming |
| 22 | People & Blogs |
| 23 | Comedy |
| 24 | Entertainment |
| 25 | News & Politics |
| 26 | Howto & Style |
| 27 | Education |
| 28 | Science & Technology |
| 29 | Nonprofits & Activism |
{
"targets": ["5b9e…"],
"caption": "Every colourway, one drop. Shop the collection at northlight.co/fall",
"media": ["https://cdn.example.com/fall-vertical.mp4"],
"youtube": {
"title": "Fall drop, in 40 seconds",
"privacy_status": "public",
"made_for_kids": false,
"category_id": "26",
"tags": ["fall fashion", "lookbook"]
}
}Check which channel an account uploads to first with GET /v1/accounts/:id/youtube/channel-info (MCP: youtube_channel_info): the channel's title, handle and link — show it to the person, so they know where the video goes — its counts, whether it may upload videos over 15 minutes, and the channel's own made-for-kids setting.
Media specifications
| Property | YouTube | Enforced by Relay |
|---|---|---|
| Count | One video per upload | Yes — exactly 1 video, post_type reel (inferred from a single video). No images, carousels or stories |
| Container | MP4 (recommended), MOV, WebM, AVI and others | MP4 and MOV only |
| Codec | H.264 with AAC audio recommended | No |
| Shape and length | Square or vertical and ≤ 3 minutes becomes a Short | Read from the file at upload, to tell you which it will be |
| Duration | ≤ 15 minutes, unless the channel is allowed long uploads; then up to 12 hours | The composer blocks a video over 15 minutes when the channel can’t upload one |
| File size | ≤ 256 GB | 2 GB (Relay’s cap) |
Relay uploads the video to YouTube itself, from its own storage, so YouTube never fetches a URL and nothing is needed from your side at publish time. Per-slide captions and first comments need an Instagram target; a YouTube video has one title and one description.
One post can target Instagram, TikTok, YouTube and Threads accounts together; each platform gets its own version and holds the post to its own rules. With a YouTube account the post must be a single video, which Instagram publishes as a reel, TikTok as a video post and Threads as a video post (up to 5 minutes there).
What happens when you publish
Relay's scheduler runs every minute and starts the upload at schedule_at — not earlier: until then the video exists only in Relay, so it can be edited or cancelled freely. Relay doesn't use YouTube's own scheduling. A post still in progress is picked up again once it has sat for 2 minutes, so each later step — the next stretch of an upload, a processing check — comes every 2–3 minutes, not every minute.
uploading— Relay opens a resumable upload with YouTube and sends the file in pieces, for up to about 25 seconds at a time, so a large file can take a few rounds, a few minutes apart. An interrupted upload resumes where YouTube says it stopped; an upload session YouTube let expire starts again from the beginning. Once the upload has started the post can't be cancelled.processing— the whole file is on YouTube, which returned the video's id (platform_post_id). After uploading, YouTube processes the video before it plays — usually a few minutes, longer for long videos. Relay checks on it every 2–3 minutes.publishedwith apermalink— YouTube finished processing. The link is/shorts/<id>for a Short and/watch?v=<id>for a video.publishedwitherror.code: youtube_processing— the video is on YouTube, but Relay couldn't confirm that YouTube finished processing it: it was still processing after Relay's 30 checks — about an hour to an hour and a half after the upload — or the check kept failing. It plays once YouTube finishes; YouTube Studio shows where it is.publishedwitherror.code: youtube_private— you asked for public or unlisted, but YouTube kept the video private (some channels' settings do, and YouTube can restrict uploads from apps it hasn't audited yet). Change its visibility in YouTube Studio.
Agents and drafts
A post with a YouTube account that is created, edited or retried with an API key — over the REST API or MCP — is always saved as a draft, whatever draft and schedule_at say. YouTube requires its upload notice (below) on the screen where the person presses the button that uploads, and the person's consent before anything is uploaded, so a person publishes it in Relay:
- On its preview page — the
preview_urlMCP returns,/posts/<id>/previewin the dashboard — when its title, visibility and made-for-kids answer are all set. The page shows the video's YouTube settings and YouTube's notice beside Publish and Schedule. - Otherwise in the composer, which the preview page sends them to (“Finish in the composer”), to answer what is missing.
So an agent should ask the person for the title, the visibility and whether the video is made for kids, put them in the youtube object — with a cover_image when the person wants a thumbnail — and hand over the preview link.
Quota & timing
YouTube gives every app a daily number of uploads. Relay's is shared by every Relay user — 100 uploads a day unless Google raises it — and resets at midnight Pacific time. YouTube also caps how many videos one channel may upload in a day. Reads (channel info, video lists) come out of a separate daily allowance, also shared, so call them when you need them rather than in a loop. Setting a thumbnail costs 50 units of that shared allowance, and adding a video's captions 400.
When an upload hits either cap, nothing fails: the target keeps a quota_exceeded breadcrumb. Every refused upload still costs a call of the shared quota, so Relay asks YouTube again only after midnight Pacific (when Relay's quota resets) or every 3 hours (a channel's own limit lifts on YouTube's clock), and once more 24 hours after the post's scheduled time; still refused then, it fails it with quota_timeout.
"error": {
"code": "quota_exceeded",
"message": "Relay's daily YouTube upload quota is used up — the post will go out when it resets (midnight Pacific)."
}| Behaviour | Value |
|---|---|
| Scheduler interval | Every minute |
| Post in progress | Picked up again once it has sat for 2 minutes — every 2–3 minutes |
| Upload | About 25 seconds of sending each time the post is picked up |
| Processing checks | 30, every 2–3 minutes (about an hour to an hour and a half), then published with youtube_processing |
| Transient error retries | 5 attempts for no answer, HTTP 429 / 5xx and YouTube’s rate limits, then the target fails |
| Cap wait | Every 2–3 minutes, up to 24 hours after schedule_at |
Failure reference
| Code | Cause | What to do |
|---|---|---|
| youtube_settings_missing | The post reached its time without a title, a visibility or a made-for-kids answer. | Edit the post’s YouTube settings, then retry. |
| youtube_media_invalid | The post doesn’t have exactly one video. | Attach a single MP4 or MOV video and retry. |
| media_missing | The video is no longer in Relay’s storage. | Attach the video again and retry. |
| youtube_processing | Not a failure: published, but YouTube hadn’t finished processing the video (or Relay couldn’t confirm it had). | Nothing — it plays once YouTube finishes. Check it in YouTube Studio. |
| youtube_private | Not a failure: published, but YouTube kept the video private. | Change its visibility in YouTube Studio. |
| quota_exceeded | Relay’s daily YouTube upload quota, or the channel’s daily upload limit, is used up. | Nothing — Relay retries for up to a day. Not terminal. |
| quota_timeout | Still capped a day after the post was due. | Retry the post later. |
| auth_reconnect_required | Google refused the authorization (removed at Google’s permissions page, or expired). The account goes reconnect_required. | Reconnect the account, then retry. |
| youtube_scope_not_authorized | The account no longer allows Relay to upload videos. | Reconnect and leave every permission ticked. |
| youtube_session_expired | YouTube kept dropping the upload session, so Relay stopped restarting the upload. | Retry the post. |
| youtube_video_missing | The video disappeared from YouTube while it was processing (deleted in YouTube Studio). | Retry to upload it again. |
| youtube_<reason> | YouTube refused the upload or the video — for example youtube_duplicate, youtube_copyright, youtube_claim, youtube_length (over 15 minutes on a channel without long uploads), youtube_codec, youtube_invalidTitle, youtube_forbiddenPrivacySetting. | Read the message — it says what YouTube objected to and how to fix it. |
Not supported
- Choosing Short or video yourself. YouTube decides from the video's shape and length; Relay tells you which it will be.
- Images, carousels and stories. A YouTube post is one video.
- A frame as the thumbnail. YouTube takes an uploaded image (
cover_image); to use a frame, export it as a JPEG first. Unverified channels show YouTube’s own frame whatever Relay sends. - Playlists and comments — no first comments, and no reading or moderating comments:
first_commentneeds an Instagram target and is posted there only. - Scheduling with YouTube's own publish time. Relay uploads at the scheduled time instead, so nothing waits on YouTube as a private, scheduled video.
- Editing or deleting a video after it is uploaded. Use YouTube Studio. Relay only uploads, adds the captions you attached, and reads; it never changes or removes a video.
- YouTube Analytics.
youtube_videos_listreports each video's current view, like and comment counts, not their history.
YouTube's notice and Terms
YouTube's Terms of Service have every app show this notice where the person presses the button that uploads. Relay shows it beside every control that sends a YouTube post out — the composer, the schedule popover, the preview page and the mobile app:
- By posting to YouTube through Relay you agree to be bound by the YouTube Terms of Service, including the Community Guidelines. Agents should make sure the person they post for knows.
- Whether a video is made for kids, and whether it contains altered or synthetic content, are your declarations to YouTube. Relay sends what you choose and decides neither.
- Relay uses YouTube API Services. What it stores and why is in Relay's Privacy Policy; Google's handling of your data is in the Google Privacy Policy. Remove Relay's access any time at myaccount.google.com/permissions.
See the REST API reference, the MCP tool reference, and the Instagram, TikTok and Threads requirements for the other platforms a post can go to.