- INIT —
POST /2/media/upload/initialize— start the session and get amedia_id - APPEND —
POST /2/media/upload/{id}/append— upload each chunk - FINALIZE —
POST /2/media/upload/{id}/finalize— complete the upload - STATUS —
GET /2/media/upload— wait for processing whenprocessing_infois 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.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
tweet_video for a regular Post. Use amplify_video for Ads creatives. See media categories.
Step 2: Upload chunks (APPEND)
Upload each chunk toPOST /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
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)
Ifprocessing_info was returned, poll until processing completes:
cURL
pending → in_progress → succeeded 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
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