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.

4 min readSume
All posts

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.

X v2 chunked upload steps, from the X changelog and Media introduction, read 2026-10-01.
StepPathNotes
1POST /2/media/upload/initializeSend total_bytes and a media_category
2POST /2/media/upload/{id}/appendSend the file in chunks
3POST /2/media/upload/{id}/finalizeComplete 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

All Developers posts

Written by Sume