Skip to content

X API media requirements

X media limits: 5MB images in JPG, PNG, GIF, or WEBP, 15MB GIFs, post video up to 20 minutes, up to 4 photos per post, and the 280-character text limit.

X takes JPG, PNG, GIF, or WEBP images up to 5MB and animated GIFs up to 15MB. Post video runs 0.5 seconds to 20 minutes on a default account. A post carries up to 4 photos, 1 GIF, or 1 video, and 280 characters unless the account has X Premium. (Checked 2026-12-05.)

Facts

Fact Official value Source Checked
Images 5MB; JPG, PNG, GIF, WEBP X API: Upload Media 2026-12-05
Animated GIF max size 15MB X API: Media best practices 2026-12-05
Post video length (default account) 0.5 seconds to 20 minutes X API: Media best practices 2026-12-05
Direct Message video length 0.5 to 140 seconds X API: Media best practices 2026-12-05
Media per post 4 X API: Media best practices 2026-12-05
Post text 280 characters (more with X Premium) X API: Create or Edit Post 2026-12-05

Where official docs disagree

What PubNio enforces

  • Video uploaded to a PubNio workspace is capped at 5GiB, and other media at 256MiB. Only media given to a post by URL can be larger, so a provider limit above those sizes applies to URL media only.
  • PubNio accepts JPEG, PNG, GIF, WebP, MP4, MOV: up to 4 images of 5MB, GIFs up to 15MB, and video up to 512MB.
  • Post text is capped at 280 weighted characters.

Read the live value

  • PubNio reports a file it will not send as media_mime_type, media_too_large, or media_count on the target, before any provider call.
  • X error codes lists the errors PubNio returns for X and how to fix each.

Limits

  • PubNio does not use X Premium’s longer post and video limits.

Sources

Type to search…

↑↓ navigate↵ selectEsc close