Skip to main content
This guide walks you through uploading videos and large media files using the v2 chunked upload endpoints. For video or large media uploads, you must:
  1. INITPOST /2/media/upload/initialize — start the session and get a media_id
  2. APPENDPOST /2/media/upload/{id}/append — upload each chunk
  3. FINALIZEPOST /2/media/upload/{id}/finalize — complete the upload
  4. STATUSGET /2/media/upload — wait for processing when processing_info is returned
Do not send command=INIT, command=APPEND, or command=FINALIZE to POST /2/media/upload. Those command-style parameters were the previous upload protocol. The v2 flow uses the dedicated paths above. command=STATUS is still used only on the status GET.
Video duration and file size are limited by the authenticated user’s Premium / verified status and by media_category. See size and duration limits. A successful upload can still be rejected when you attach the media_id to POST /2/tweets.

Step 1: Initialize upload (INIT)

Start the upload session. Send a JSON body — not multipart form fields.
cURL
Response:
Use tweet_video for a regular Post. Use amplify_video for Ads creatives. See media categories.

Step 2: Upload chunks (APPEND)

Upload each chunk to POST /2/media/upload/{id}/append. Keep each segment at or below 5 MB (the server maximum is 8 MB). Segments are indexed from 0.
cURL
Chunking advantages:
  • Improved reliability on slow networks
  • Uploads can be paused and resumed
  • Failed chunks can be retried individually

Step 3: Finalize upload (FINALIZE)

Complete the upload after all chunks are sent:
cURL
Response:
Example response
If processing_info is returned, proceed to Step 4 to wait for processing. If not, the media is ready to use.

Step 4: Check status (STATUS)

If processing_info was returned, poll until processing completes:
cURL
Processing states: pendingin_progresssucceeded or failed

Step 5: Create Post with media

Once processing is complete, create a Post with the media. Duration and size are checked again against the posting user’s entitlement.
cURL
If the video is longer than the posting user is allowed to attach, the response is 403 Forbidden:
N is the posting user’s duration cap (20 minutes by default, 125 minutes for Premium / verified).

Media categories

If you omit media_category, the upload is treated as Post media (tweet_image, tweet_video, or tweet_gif) based on content type.

Next steps

Best practices

File constraints, codecs, and duration limits

Create Posts

Post with media

Initialize

INIT endpoint reference

Create Post

POST /2/tweets reference