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.

4 min readSume
All posts

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.

Pre-flight checks from the X best-practices page, read 2026-10-01.
CheckX rule on the pageSume tool that helps
Categorytweet_video for a regular PostNone; set it in your upload call
Duration0.5 seconds to 20 minutes by default, 125 minutes Premiumvideo_trim caps its output at 900 s
AudioAAC LC, mono or stereovideo_inspect probe, with probe.has_audio
Pixel formatYUV 4:2:0 onlyExact trim re-encodes to yuv420p
Open GOPMust not have itNot 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

All Developers posts

Written by Sume