X animated GIF limit: 15 MB, 350 frames, and the MP4 alternative
X allows an animated GIF up to 15 MB and recommends 1280x1080 and 350 frames or fewer. Sume makes MP4 video, not GIF, so attach a short MP4 instead.

X's best-practices page says an animated GIF must be 15 MB or smaller, and recommends 1280x1080 or less, 350 frames or fewer, and at most 300 million pixels (width x height x frames). Sume does not output GIF: generated clips are MP4 video, so for X a short MP4 is the Sume-side answer.
X figures are from its Media best practices page, read 2026-10-01. Sume facts are from Video generation and Video trim.
What are X's GIF limits?
X notes a GIF can fail at Post creation even within the size limit, so the recommendations matter. A Post takes up to 4 photos, 1 animated GIF or 1 video, never a mix.
| Rule | Value |
|---|---|
| File size | 15 MB or less |
| Resolution (recommended) | 1280x1080 or less |
| Frames (recommended) | 350 or less |
| Pixels (recommended) | 300 million or less (width x height x frames) |
| Larger GIFs | Chunked upload with media_category=tweet_gif |
Does Sume make GIFs?
No. A generated video is MP4: the output content_type is something like video/mp4. Auto create controls default to 720p and 8 seconds, with 3 to 10 second clips at 16:9 or 9:16.
What is the MP4 alternative?
Attach the MP4 as a video instead. A 350-frame GIF at 25 fps runs about 14 seconds, so a short MP4 loop covers the same ground, and X's video rules (not its GIF rules) then apply; see X video upload specs. To shorten a clip, use video-trim, whose duration accepts 0.2 to 900 seconds.
How do I do the frame arithmetic?
Multiply width, height and frames and compare with 300 million. For example, 1280 x 1080 x 350 is 483.8 million, over the recommendation, so a full-size, full-length GIF breaches the pixel budget even when it respects each other limit. Shrink the frame or drop frames, or use MP4.
Sources
Related posts
More in Developers
- X API 403 "not allowed to post a video longer than N minutes"
The 403 means the clip exceeds the posting account's cap: 20 minutes by default, 125 for Premium or verified. Cut the video to that cap before you post.
- 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 media upload: initialize, append, finalize a Sume video
X's chunked upload now uses POST /2/media/upload/initialize, append and finalize. Download the finished Sume video, then run the three calls yourself.
- 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.
Written by Sume