https://api.x.com/2/tweets/:id
You need to specify expansions as you need to check includes.media array and check the type https://developer.x.com/en/docs/x-api/data-dictionary/object-model/media