# YouTube (/docs/platforms/youtube)




What you can post [#what-you-can-post]

| Type   | Supported | Notes                                                                                            |
| ------ | --------- | ------------------------------------------------------------------------------------------------ |
| Video  | ✅         | Max 12 hours (verified) or 15 min (unverified). MP4, MOV, AVI, WMV, FLV, 3GPP, WebM. Max 256 GB. |
| Shorts | ✅         | ≤3 min AND vertical (9:16). Auto-detected by YouTube — no flag needed                            |
| Image  | ❌         | YouTube is video-only                                                                            |
| Text   | ❌         | A video file is always required                                                                  |

<Callout title="Limitations" type="warn">
  * **Video required.** Every YouTube post needs exactly one video file.
  * **Title max 100 characters.** Cannot contain `<` or `>`.
  * **Description max 5000 characters.** Cannot contain `<` or `>`.
  * **Tags total max 500 characters.** Tags with spaces count as quoted (+2 chars).
  * **Max duration: 12 hours** (verified projects) or **15 minutes** (unverified).
</Callout>

<Callout title="YouTube Shorts" type="info">
  There is no separate API endpoint or post type for Shorts. YouTube automatically classifies a video as a Short when it is **3 minutes or shorter** with a &#x2A;*vertical aspect ratio (9:16)**. Upload it the same way as any other video.

  * Videos under 15 seconds will loop on playback
  * The YouTube API does not support setting custom thumbnails on Shorts
</Callout>

Quick start [#quick-start]

Upload a video [#upload-a-video]

<div className="fd-steps">
  <div className="fd-step">
    Get your media ready [#1-get-your-media-ready]

    <Tabs items="['Upload new media', 'Use existing media']">
      <Tab value="Upload new media">
        ```bash
        curl -X POST https://publishq.com/api/v1/media \
          -H "Authorization: Bearer pq_live_..." \
          -F "file=@video.mp4"
        ```
      </Tab>

      <Tab value="Use existing media">
        ```bash
        curl https://publishq.com/api/v1/media \
          -H "Authorization: Bearer pq_live_..."
        ```

        Pick the `id` of the video you want to use.
      </Tab>
    </Tabs>
  </div>

  <div className="fd-step">
    Create the post [#2-create-the-post]

    ```bash
    curl -X POST https://publishq.com/api/v1/posts \
      -H "Authorization: Bearer pq_live_..." \
      -H "Content-Type: application/json" \
      -d '{
        "content": "My video title",
        "mediaIds": ["med_abc123"],
        "accounts": [
          {
            "accountId": "acc_youtube_123",
            "platformSpecificSettings": {
              "description": "Full video description with links and timestamps.\n\n0:00 Intro\n1:30 Main topic",
              "privacyStatus": "public",
              "categoryId": "28",
              "tags": ["tech", "tutorial", "how to"],
              "madeForKids": false,
              "containsSyntheticMedia": false
            }
          }
        ]
      }'
    ```

    `content` is the video title (max 100 characters). The longer description goes in `platformSpecificSettings.description`.

    <Callout title="Title overflow" type="info">
      If your `content` exceeds 100 characters, PublishQ trims the title to 100 characters and prepends the full text to the description. Use `postOverrides` to set a shorter title for YouTube when posting to multiple platforms.
    </Callout>
  </div>
</div>

Post to YouTube + other platforms [#post-to-youtube--other-platforms]

When your title works for other platforms but is too long for YouTube's 100-char limit, use `postOverrides`:

```bash
curl -X POST https://publishq.com/api/v1/posts \
  -H "Authorization: Bearer pq_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "This is a longer caption that works great on Instagram and TikTok but exceeds YouTube 100 char limit for titles",
    "mediaIds": ["med_abc123"],
    "accounts": [
      {
        "accountId": "acc_youtube_123",
        "postOverrides": {
          "content": "Short YouTube title"
        },
        "platformSpecificSettings": {
          "description": "Full description for YouTube...",
          "privacyStatus": "public"
        }
      },
      {
        "accountId": "acc_instagram_456"
      }
    ]
  }'
```

Video specs [#video-specs]

| Property      | Limit                                     |
| ------------- | ----------------------------------------- |
| Max file size | 256 GB                                    |
| Max duration  | 12 hours (verified) / 15 min (unverified) |
| Shorts        | ≤3 min AND vertical (9:16). Auto-detected |
| Formats       | MP4, MOV, AVI, WMV, FLV, 3GPP, WebM       |
| Title         | Max 100 characters                        |
| Description   | Max 5000 characters                       |
| Tags          | Max 500 characters total                  |
| Privacy       | `public`, `unlisted`, `private`           |

Platform settings [#platform-settings]

<PlatformSettingsTable platform="YOUTUBE" />

<small>
  Full schema: 

  [YouTubePlatformSpecificSettings](/docs-scalar#model/YouTubePlatformSpecificSettings)
</small>

Not yet supported [#not-yet-supported]

* **Custom thumbnails**: Not implemented yet, so YouTube auto-generates one from a video frame.
* Adding to playlists after upload
* Captions / subtitles
