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 Articles API: draft, publish and a generated cover image
The X Articles API has POST /2/articles/draft and a publish call, with optional cover media. Make the cover with a Sume image call, then upload it to X.
- X API image 5 MB limit: pick a Sume output format
X allows JPG, PNG, GIF and WEBP images up to 5 MB on every account. Sume outputs png, jpeg or webp, with no target file size field in the docs.
- 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.
Written by Sume