TikTok oEmbed: embed a posted clip, or host the MP4 yourself?
TikTok's oEmbed endpoint turns a video URL into an embed blockquote. When that beats hosting the file, and what a Sume-made MP4 changes about the choice.

To embed a TikTok on your own page, call GET https://www.tiktok.com/oembed?url=<video url> and paste the returned html into the page. If the clip was made with Sume and you only need people to watch it, hosting the MP4 yourself avoids a third-party script; if you want TikTok's own player on the page, use the embed.
The two options solve different problems, so the decision is about what the page is for.
What does the TikTok oEmbed endpoint return?
TikTok's embed documentation describes a single required parameter, url, the video link. The response follows the oEmbed specification: version, type (video), title, author name and URL, an html string, width and height, thumbnail URL with its dimensions, and provider name and URL. Width and height are both reported as "100%".
The html is a blockquote with the class tiktok-embed, carrying attributes such as data-video-id and data-embed-from="oembed", plus a script tag that loads TikTok's embed code. TikTok's page does not state rate limits or caching rules, so cache the response on your side and avoid calling it on every page view.
curl -G "https://www.tiktok.com/oembed" \
--data-urlencode "url=https://www.tiktok.com/@scout2015/video/6718335390845095173"When should you embed instead of hosting the file?
The embed is right when the page should show the post as it lives on TikTok, with TikTok's player and the creator details the response carries. It also keeps the video inside TikTok's own delivery, so you carry no bandwidth for it. The trade-offs are an external script on your page, a layout you do not control beyond the 100% width, and a dependency on the post staying public.
Hosting is right when the page is a product page or a landing page where the clip is part of your design. You choose the poster frame, autoplay behavior and caption style, and the video does not vanish if the TikTok post is removed.
| Question | Embed with oEmbed | Host the MP4 |
|---|---|---|
| Who serves the video | TikTok | You or your CDN |
| Page weight | Adds TikTok's script | Your file size |
| If the post is removed | The embed breaks | The file keeps playing |
| Player | TikTok's player | Your own, with your poster frame |
How does a Sume clip fit either route?
Sume jobs return a result you fetch through jobs and results; an avatar clip is a finished video on media.sume.com. For hosting, point your video tag at that artifact URL, or copy it to your own storage if you want control over caching. For a poster image, use video frames with at: [1.5] to pull a still at a time you name.
For the embed route, you first post to TikTok yourself; Sume does not post. After the post is live, take its URL and run the oEmbed call above.
What are the caveats?
Use public posts only; an oEmbed call for a private video is not something TikTok's page describes, so test before you build. Check your own embed in a mobile browser, since 100% width inside a narrow column behaves differently from a full-width layout. Finally, if the clip is AI-generated, decide how you disclose it on your own page too; the embed shows whatever TikTok shows, and a hosted MP4 shows only what you add.
A last practical point on thumbnails: the oEmbed response includes a thumbnail URL with dimensions, which is handy for a lightweight link preview that loads the full embed only on click. That keeps the page fast while you still show the real post. For a hosted file, generate your own poster with Sume's frame extraction and set it on the video tag, so the first paint matches the clip's best moment instead of a blank frame.
Think about maintenance too. An embed is one line of markup that TikTok keeps current, so a design change on their side reaches your page without a deploy. A hosted file is yours to keep: you re-encode it if a browser drops a codec, and you pay for the traffic. For a short marketing clip, that cost is small; for a library of hundreds of clips, it adds up, and the embed route may be easier to run.
Whichever you choose, keep the Sume job id next to the page entry. If the clip needs a correction, you regenerate from the same script, repost or replace the file, and update the page once.
Sources
Related posts
More in Developers
- Transactional outbox for paid API calls in Python (Sume)
Write the Sume request and its Idempotency-Key in the order's transaction, drain later: a tested Python outbox that survives crashes, 429s and 409s.
- Transcribe a three-hour recording when the API caps at ten minutes
Streaming sessions end at an hour; Sume STT jobs take up to 600 seconds. Split with Timeline audio, transcribe 18 chunks, and stitch word times back together.
- Translate an SRT and burn it in: Sume caption cues, limits, Python
Sume takes no SRT upload, but caption cues take the same text and times. A Python converter, the 200-cue and 60-second limits, and which fonts apply.
- TTS word timings to burned-in captions: send them as words on Sume
Sume's TTS can return word start and end times; the caption job accepts words with text, start and end and skips transcription. How to wire them together.
Written by Sume