Retrieves details of a specific Media file by its media key.
curl --request GET \
--url https://api.x.com/2/media/{media_key} \
--header 'Authorization: Bearer <token>'{
"data": {
"type": "<string>",
"preview_image_url": "<string>",
"variants": [
{
"bit_rate": 123,
"content_type": "<string>",
"url": "<string>"
}
],
"height": 1,
"media_key": "<string>",
"width": 1
},
"errors": [
{
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"status": 123
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A single Media Key. The Media Key identifier for this attachment.
^([0-9]+)_([0-9]+)$A comma separated list of Media fields to display. The fields available for a Media object.
1alt_text, duration_ms, height, media_key, non_public_metrics, organic_metrics, preview_image_url, promoted_metrics, public_metrics, type, url, variants, width [
"alt_text",
"duration_ms",
"height",
"media_key",
"non_public_metrics",
"organic_metrics",
"preview_image_url",
"promoted_metrics",
"public_metrics",
"type",
"url",
"variants",
"width"
]The request has succeeded.
Show child attributes
1An HTTP Problem Details object, as defined in IETF RFC 7807 (https://tools.ietf.org/html/rfc7807).
Show child attributes
curl --request GET \
--url https://api.x.com/2/media/{media_key} \
--header 'Authorization: Bearer <token>'{
"data": {
"type": "<string>",
"preview_image_url": "<string>",
"variants": [
{
"bit_rate": 123,
"content_type": "<string>",
"url": "<string>"
}
],
"height": 1,
"media_key": "<string>",
"width": 1
},
"errors": [
{
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"status": 123
}
]
}