SocialAPI.ai
Blog

What Is the X API Video Upload Limit in 2026? 20 Minutes, 8 GB, Not 140 Seconds

Erwan Prost

Erwan Prost

Founder, SocialAPI.ai

Published
Reading time
10 min
On this page

Since 1 September 2026 the X API accepts Post video up to 20 minutes and 8 GB for a default account, and up to 125 minutes and 16 GB for an X Premium or verified account (X media best practices, checked on 18 October 2026). The figure most guides still repeat, 140 seconds and 512 MB, is now the limit for DM video (media_category=dm_video) on a default account. It is not the limit for a video in a Post.

The cap follows the account that posts, not your developer plan. The X developer changelog entry dated 1 September 2026 says "Limits follow the authenticated user's X Premium / verified status and media_category, not your developer API plan" (checked on 18 October 2026). So the same app can upload a 90-minute video for one connected user and get a 403 for another. Pricing is a separate question, covered in X API pricing 2026.

What are the X API media limits by type and context?

One table, every cell tied to a numbered source at the bottom of the page. Sources 1 and 2 are X's own media pages, both checked on 18 October 2026.

MediaContextMax sizeMax durationResolutionFrame rateCodecsAspect ratio
VideoPost, default account (tweet_video, amplify_video)8 GB [2]20 min [2]32x32 to 1280x1024 [1]60 FPS or less [1]H.264 High Profile, AAC LC mono or stereo [1]1:3 to 3:1, pixel aspect ratio 1:1 [1]
VideoPost, X Premium or verified16 GB [2]125 min [2]32x32 to 1280x1024 [1]60 FPS or less [1]H.264 High Profile, AAC LC mono or stereo [1]1:3 to 3:1, pixel aspect ratio 1:1 [1]
VideoDM, default account (dm_video)512 MB [2]140 s [2]See noteSee noteSee noteSee note
VideoDM, X Premium or verified1 GB [2]10 min [2]See noteSee noteSee noteSee note
Animated GIFPost or DM (tweet_gif, dm_gif)15 MB [2]Not stated1280x1080 or less, recommended [1]350 frames or fewer, recommended [1]Not statedNot stated
ImagePost or DM (tweet_image, dm_image)5 MB [2]Not applicableNot statedNot applicableJPG, PNG, GIF, WEBP [2]Not stated

Note on the DM rows: X's best-practices page lists the video requirements once, under the video heading, and does not repeat them per context. The resolution, frame rate, codec and aspect ratio cells for DM video are therefore not separately stated for DMs. Read them from the Post row only if you accept that assumption.

The GIF row comes with a caveat from the same page: the 1280x1080, 350 frames and 300 million total pixels (width x height x frames) figures are recommendations, and a GIF inside the 15 MB size limit can still fail at Post creation (source 1). Treat them as hard limits in your own validation.

Three more video constraints from the same page matter when you transcode before upload. The pixel format must be YUV 4:2:0, the audio profile must be AAC Low Complexity (High-Efficiency AAC is not supported, and 5.1 or higher channel layouts are not accepted), and open GOP is not allowed. Progressive scan is required. For playback X recommends 30 or 60 FPS, a minimum video bitrate of 5,000 kbps and a minimum audio bitrate of 128 kbps. A Post carries at most 4 photos, or 1 animated GIF, or 1 video.

When did the X video limits change?

The changelog is short on history. It dates the new Post-video tiers and the v2 chunked endpoints, and it does not print the previous Post-video limits, so this timeline stops at what X wrote down.

DateChangeSource
16 January 2025New X API v2 media upload endpoints launched[3]
30 April 2025Dedicated endpoints for chunked media upload[3]
1 September 2026Post-video limits tiered by account status: 20 min and 8 GB by default, 125 min and 16 GB for Premium or verified. DM video limits unchanged. The chunked quickstart moves to the v2 initialize, append and finalize paths[3]

"DM video limits unchanged" is the changelog's own wording. That is why 140 seconds and 512 MB survive in the DM rows and nowhere else.

Why do guides still say 140 seconds and 512 MB?

Several third-party pages still quote a 140 second, 512 MB video limit for Posts. That pair is real: it is the default-account limit for dm_video in the table above. Pages written before the 1 September 2026 change, or copied from ones that were, apply it to every video. If an uploader library hard-codes 140 seconds, it rejects a 15-minute video that X would have accepted.

The reverse mistake also exists. A client that reads "20 minutes" and applies it to every connected account will reject a 90-minute video from a Premium user. The limit is a property of the posting account, and the API does not tell you which tier that account is on before you upload.

How does chunked video upload work on the X API?

Videos go through chunked upload. X's media introduction says "Use chunked upload for all videos" and "Simple POST /2/media/upload is for images and small files only" (source 2). The flow, as documented in the chunked upload quickstart (checked on 18 October 2026), has four steps.

  1. 1.INIT: POST /2/media/upload/initialize with a JSON body. The response returns the media ID as id.
  2. 2.APPEND: POST /2/media/upload/{id}/append, once per chunk. segment_index starts at 0 and goes up by one per chunk.
  3. 3.FINALIZE: POST /2/media/upload/{id}/finalize after the last chunk.
  4. 4.STATUS: GET /2/media/upload with command=STATUS and the media ID, only if the FINALIZE response contains processing_info.
Chunked video upload, as X documents it
INITYour uploader → X APIPOST /2/media/upload/initializemedia idX API → Your uploaderid, expires_after_secsAPPEND, once per chunkYour uploader → X APIsegment_index 0, 1, 2...FINALIZEYour uploader → X APIafter the last chunkprocessing_infoX API → Your uploaderstate: pendingSTATUSYour uploader → X APIwait check_after_secsstateX API → Your uploaderin_progress, then succeeded orfailedOnly if processing_info is present

INIT returns a media ID, APPEND repeats once per chunk, FINALIZE closes the upload, and STATUS is polled only when FINALIZE returns processing_info. Source: X chunked upload quickstart, checked on 18 October 2026.

The quickstart warns against sending command=INIT, command=APPEND or command=FINALIZE to POST /2/media/upload, because that was the previous protocol. INIT accepts total_bytes up to 16 GB, which matches the Premium Post-video cap (source 2). The quickstart says to keep each chunk at or below 5 MB, states a hard server maximum of 8 MB, and uses 4 MB chunks in its examples. At that size, an 8 GB video is about 2,000 APPEND calls and a 16 GB video about 4,000 (arithmetic on the quickstart's example, not an X statement).

After FINALIZE, processing_info carries the state of server-side processing. The media upload status reference documents three fields: state (pending, in_progress, failed, succeeded), progress_percent, and check_after_secs, described as "Seconds to wait before polling status again." The quickstart's FINALIZE example returns check_after_secs of 1. Use the value the response gives you, not a constant of your own.

The payload below is an example with placeholder values, modelled on the shape in the quickstart. It is not a captured response.

json
{
  "data": {
    "id": "1880028106020515840",
    "media_key": "13_1880028106020515840",
    "processing_info": { "state": "pending", "check_after_secs": 1 }
  }
}

Both INIT and FINALIZE responses include expires_after_secs, which is 86400 in the quickstart examples (24 hours).

Why does a successful upload still fail at Post creation?

Upload and Post creation are checked separately. The best-practices page says a video that exceeds the posting user's allowance makes POST /2/tweets return 403 Forbidden even after a successful upload, with the message below, and tells you to handle it after a successful finalize.

text
This user is not allowed to post a video longer than N minutes.

A second trap sits in media_category. The best-practices page warns that using a DM category on a Post can let the upload succeed while Post creation fails. Send tweet_video for a Post video and dm_video only for a DM. For larger Post GIFs, set media_category=tweet_gif on the chunked upload to get asynchronous processing.

How should you validate X video size and duration before upload?

Read duration and size from the file before you upload anything. Compare against the limit for the context you are sending to (Post or DM), and treat the Premium column as a ceiling, not a guarantee. Then handle the 403 at Post creation as a normal outcome for default accounts rather than an exception. X changed these numbers on 1 September 2026, so keep them in configuration, and re-read the best-practices page when you touch the code.

SocialAPI.ai covers X through one API; see the X platform page for what it supports. Every X fact on this page comes from X's own developer documentation, linked below, so check them there.

Questions developers ask about X video limits

What is the X API video upload limit for a Post?
20 minutes and 8 GB for a default account, and 125 minutes and 16 GB for an X Premium or verified account, since 1 September 2026 (X media best practices, checked on 18 October 2026). Send the video as tweet_video or amplify_video.
Is the 140 second, 512 MB limit still real?
Yes, but only for DM video (dm_video) on a default account. Premium or verified accounts get 10 minutes and 1 GB for DM video. Neither number applies to a video in a Post.
Does my X API plan change the video limit?
No. The X changelog entry of 1 September 2026 says limits follow the authenticated user's X Premium or verified status and the media category, not your developer API plan. Two users connected to the same app can have different limits.
How big can each upload chunk be?
The chunked upload quickstart says to keep each chunk at or below 5 MB and states a hard server maximum of 8 MB. Its examples use 4 MB chunks.
Why did POST /2/tweets return 403 after my video finalized?
The video is longer than the posting user's allowance. X checks upload and Post creation separately, and the message reads "This user is not allowed to post a video longer than N minutes." Handle it as a normal outcome for default accounts.

Every X fact above comes from X's developer documentation, each page checked on 18 October 2026. Numbers in square brackets in the tables refer to this list. 1. X Developer Platform, Media best practices, 2. X Developer Platform, Media introduction, 3. X Developer Platform, changelog (entries of 16 January 2025, 30 April 2025 and 1 September 2026), 4. X Developer Platform, Chunked media upload quickstart, 5. X Developer Platform, Get media upload status

Keep reading

Ready to unify your social interactions?

Free tier available. No credit card required. Ships with the MCP server.