X API media_category: tweet_video vs amplify_video vs dm_video
Pick media_category by destination: tweet_video for Posts, amplify_video for Ads, dm_video for DMs. Wrong category uploads fine and fails at Post create.

Use tweet_video for a regular Post, amplify_video for Ads creatives, and dm_video for a Direct Message. X warns that a wrong category, for example a DM category on a Post, is a common reason an upload succeeds and Post create then fails.
Category rules are from X's Media best practices page, read 2026-10-01. Sume returns one MP4 per trim whatever the destination, per Video trim; the category is chosen on the X upload call.
Which category belongs to which destination?
If media_category is omitted, X assumes a Post category (tweet_image, tweet_video or tweet_gif) from the content type.
| Category | Use for |
|---|---|
tweet_image, tweet_video, tweet_gif | Regular Posts |
amplify_video | Ads creatives |
dm_image, dm_video, dm_gif | Direct Messages |
subtitles | Subtitle files |
Do the limits differ between tweet_video and amplify_video?
For Posts, X says the Premium and default duration and size caps are the same for tweet_video and amplify_video. DM video is different: 0.5 to 140 seconds and 512 MB by default, and 0.5 seconds to 10 minutes and 1 GB for Premium or verified accounts.
Why does a wrong category fail late?
Upload limits and Post-create limits are separately enforced, so a media_id that finalized can still be rejected by POST /2/tweets. Set the category in the initialize call and test an attach before you batch uploads.
How do I cut one source for several categories?
Sume's POST /v1/video-trim returns a new MP4 for [start, end), with duration from 0.2 to 900 seconds and an optional { width, height, fps } conform. Run it once per destination: a short cut for a DM, the full cut for a Post. Each output is a separate file that you upload with its own category. The DM limit side is in trim a clip for direct messages.
Sources
Related posts
More in Developers
- X API media upload succeeded but the Post fails: two-stage checks
X enforces media limits at upload and again at POST /2/tweets, by the posting user. Here is a pre-flight list and what Sume's inspect and trim cover.
- X API paid_partnership true: disclose a sponsored AI video Post
Set paid_partnership true in POST /2/tweets to label a Post as paid promotion on X. Sume returns the video file; your own call creates and flags the Post.
- X API subtitles media_category: SRT sidecar vs burned-in captions
X lists `subtitles` as a media_category for sidecar files. Sume burns captions into the picture and does not take SRT uploads. Pick the path that fits.
- X video minimum 0.5 seconds: keep Sume trim cuts at 0.5 s or more
X needs Post video of at least 0.5 seconds; Sume video-trim allows cuts down to 0.2 seconds. Set duration to 0.5 or more for X, with the upper caps.
Written by Sume