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.

A finalized media_id is not a promise that the Post will go through. X's page says upload limits and Post-create limits are separately enforced, so POST /2/tweets can still reject media that finalized, and the limits follow the posting user rather than your developer plan.
X facts are from its media best-practices page; clip tooling from Sume's Video inspect and Video trim docs, read 2026-10-01.
Why can the upload pass and the Post fail?
X lists three causes on that page. Limits are enforced first by the upload endpoints, then again when you attach the id to a Post, DM or similar entity. Limits depend on the authenticated user's Premium or verified status. And using the wrong category, for example a DM category on a Post, is called a common reason an upload succeeds and Post create then fails.
What should I check before uploading?
Run the list below against the clip and the account that will post it.
| Check | X rule on the page | Sume tool that helps |
|---|---|---|
| Category | tweet_video for a regular Post | None; set it in your upload call |
| Duration | 0.5 seconds to 20 minutes by default, 125 minutes Premium | video_trim caps its output at 900 s |
| Audio | AAC LC, mono or stereo | video_inspect probe, with probe.has_audio |
| Pixel format | YUV 4:2:0 only | Exact trim re-encodes to yuv420p |
| Open GOP | Must not have it | Not documented in the Sume docs |
How do I cut a clip to fit?
POST /v1/video-trim takes a Sume-hosted clip plus start and exactly one of end or duration, and writes a new MP4. Output is capped at 900 seconds and source at 1800 seconds. The server compiles ffmpeg, so raw fields such as codec or crf come back as ffmpeg_fields_rejected. For the specific 403 duration message see the trim-to-the-cap post.
What do I do when Post create still rejects the id?
Handle the error at the Post step, not just at finalize. X documents a 403 with the text "This user is not allowed to post a video longer than N minutes", where N is the posting user's cap. Re-check the category and the account's entitlement, trim if the clip is over the cap, and upload again.
Sources
Related posts
More in Developers
- 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 DM video limit: 140 seconds and 512 MB, and how to trim to it
X lists DM video (dm_video) at 140 seconds and 512 MB by default. Cut a clip to length with Sume video-trim, which takes 0.2 to 900 seconds.
- 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