Skip to content

Today I learned

YouTube API: containsSyntheticMedia not set after upload

I upload AI-voiced Shorts through the YouTube Data API with status.containsSyntheticMedia: true in videos.insert. The upload works, but the "Altered content" flag in Studio stays off.

The fix is to set the flag in a second call, videos.update on the status part. That call replaces the whole status object, so send every field again. Any field you leave out goes back to its default.

js
await fetch('https://www.googleapis.com/youtube/v3/videos?part=status', {
  method: 'PUT',
  headers: { authorization: `Bearer ${token}`, 'content-type': 'application/json' },
  body: JSON.stringify({
    id: videoId,
    status: {
      privacyStatus: 'private', // resend, or it changes
      selfDeclaredMadeForKids: false,
      embeddable: true,
      license: 'youtube',
      containsSyntheticMedia: true,
    },
  }),
})

Check status.containsSyntheticMedia in the response and warn if it is still false. Calls made right after a fresh upload can return 409 ABORTED or a 5xx for a while, so retry them with backoff.

Hit this while building the bot that turns my TIL notes into Shorts with a cloned voice.

Docs: https://developers.google.com/youtube/v3/docs/videos#status.containsSyntheticMedia

The 30-second version

Share LinkedIn Post on X

Related notes

Newsletter

Occasional notes on engineering, game tech, and new tools — no spam, unsubscribe anytime.

Ravy

Engineering manager, founder, and software developer building web platforms, game systems, real-time services, and automation tools. 15 years of shipped work — currently at Gaijin.net.

Get in Touch

Building an MVP, shipping a game feature, or automating a team workflow? Open source or paid — let's talk.

Contact Me
© 2020-2026 XPLOIT FZE. All trademarks, names and logos belong to their respective copyright holders.