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's Sep 1, 2026 changelog says the chunked upload quickstart now uses POST /2/media/upload/initialize, /{id}/append and /{id}/finalize, instead of the earlier command-style POST /2/media/upload. For a Sume video, finish the job, download the file from the content URL, and send those bytes through the three X calls yourself.
X facts are from its changelog and Media introduction, read 2026-10-01. Sume facts are from Video generation.
What are the three X calls?
X says to use chunked upload for all videos, and that the simple upload is for images and small files only. initialize accepts total_bytes up to 16 GB, and a larger value than the account may upload fails at initialize or finalize. Media categories include tweet_video and amplify_video.
| Step | Path | Notes |
|---|---|---|
| 1 | POST /2/media/upload/initialize | Send total_bytes and a media_category |
| 2 | POST /2/media/upload/{id}/append | Send the file in chunks |
| 3 | POST /2/media/upload/{id}/finalize | Complete the upload |
Where does the file come from on the Sume side?
Sume's job flow is submit with an Idempotency-Key, poll the job, then read the result. For video, the status response carries unsigned_urls, and the documented last step is to download the video from the content URL (GET /v1/videos/{jobId}/content). Run output files carry a durable media.sume.com URL whose expires_at is null.
How do I get total_bytes?
Use the byte length of the file you downloaded, or the size_bytes field when the result carries it (it can be null). Initialize needs the exact size before you append, so download first and read the length from what you hold, not from a header you did not verify.
What should I watch for?
Keep the Sume job id so a retry of your upload does not resubmit a paid generation; see AI video API timeouts. Check the clip against X's limits first, for example the 140-second DM cap if you target a message, and see X video upload specs.
Sources
Related posts
More in Developers
- X video minimum 0.5 seconds: keep Sume trim cuts at 0.5 s or more
X needs Post video of at least 0.5 seconds; Sume video-trim allows cuts down to 0.2 seconds. Set duration to 0.5 or more for X, with the upper caps.
- X video audio must be AAC-LC, not HE-AAC: check an AI video
X requires AAC Low Complexity audio, mono or stereo, with H264 High Profile and YUV 4:2:0. What Sume's exact trim keeps and re-encodes, and what it leaves.
- X video max 1280x1024, ratio 1:3 to 3:1, 60 fps: conform a clip
X video must be 32x32 to 1280x1024, 60 fps or less, ratio 1:3 to 3:1. Read literally, a default 1080x1920 Timeline file is over; conform with video-trim.
- X video 5,000 kbps recommendation: Sume trim has no bitrate field
X recommends H264 High Profile at 30 or 60 FPS and 5,000 kbps. Sume trim cannot set bitrate or codec; you can conform fps and size, and audio stays AAC.
Written by Sume