#2217·tweepy

API v2 media uploads - Deadline passed Hack in comments

Author: dhjwCreated Jan 17, 2025Updated Aug 10, 2025
LabelsFeature Request

Announcing media upload endpoints in the X API v2

You can upload images or videos using the POST https://api.x.com/2/media/upload endpoint and attach the media to a Post on X using POST https://api.x.com/2/posts

Developers that have been using our older media upload endpoints i.e. https://upload.twitter.com/1.1/media/upload.json should now start migrating to the new v2 endpoint.

Check out our complete guide on uploading and publishing media to X using the X API v2.

See our developer docs for more information. You can also get started using our Postman collection or sample code from our Github repository.

X Developer Platform team


More enhancements to Media Upload X API v2

We are thrilled to announce the launch of three new endpoints in the X API v2, enabling developers to add metadata and subtitles to uploaded media:

Developers using the older v1 media metadata and subtitle management endpoints should begin migrating to these new v2 endpoints.

To learn more about how to use these new endpoints and fields, check out our updated developer documentation.

X Developer Platform Team