A media object represents a single photo, video or animated GIF. Media objects are used by many endpoints within the Twitter API, and may be included in Tweets, direct messages, user profiles, advertising creatives and elsewhere. Each media object has multiple display or playback variants, with different resolutions or formats.
Objects such as Tweets, direct messages, user profile pictures, hosted
Ads cards, etc. can contain one or more media objects. These top-level
objects are collectively known internally as product entities. The
relevant product entity creation API (e.g.
POST statuses/update) can
be passed one or more media objects using a unique
A product entity which contains media object(s) can be created by following these steps:
1) Upload the media file(s) using either the simple (image
only) or the chunked
(recommended) media upload
API to receive a
media_id. This step may be repeated multiple times
with different media if the product entity allows multiple
parameters to be passed in.
2) Create the product entity by calling the appropriate endpoint,
media_id and other required parameters. For example,
media_id to a Tweet using the