Skip to main content
This section documents the media data returned by the Perplexity endpoint. Media is part of the Perplexity response — no separate API call is needed.

Example request

Media is surfaced based on query relevance: send a prompt where videos or images are likely to be useful (tutorials, visual subjects, news coverage). No flag is required.
{
  "prompt": "how to change a bicycle tire",
  "country": "US"
}
This produces a response containing the videos and images arrays documented below.

Overview

Perplexity automatically surfaces videos and images relevant to the query. Media items are returned in the videos and images arrays.
Videos in Perplexity

Media structure

FieldTypeDescription
result.videosarrayVideo content found in response
result.imagesarrayImage content found in response
Each media item includes:
FieldTypeDescription
titlestringMedia title
urlstringMedia URL
thumbnailstringThumbnail URL
mediumstringMedia type (“video”, “image”)
sourcestringSource platform (“youtube”, “stock_photo”, etc.)
image_widthnumberOriginal image width
image_heightnumberOriginal image height
thumbnail_widthnumberThumbnail width
thumbnail_heightnumberThumbnail height

Response example

{
  "success": true,
  "result": {
    "text": "Changing a bicycle tire is straightforward once you know the steps...",
    "videos": [
      {
        "title": "How to Change a Bike Tire",
        "url": "https://www.youtube.com/watch?v=example",
        "thumbnail": "https://i.ytimg.com/vi/example/hqdefault.jpg",
        "medium": "video",
        "source": "youtube",
        "thumbnail_width": 480,
        "thumbnail_height": 360
      }
    ],
    "images": [
      {
        "title": "Bicycle tire replacement",
        "url": "https://example.com/tire.jpg",
        "thumbnail": "https://example.com/tire-thumb.jpg",
        "medium": "image",
        "source": "stock_photo",
        "image_width": 1920,
        "image_height": 1080,
        "thumbnail_width": 320,
        "thumbnail_height": 180
      }
    ]
  }
}