cloro WebsiteAPI Get an API key
API Reference › Perplexity › Media

Media

Ranked video and image results that Perplexity attaches to an answer whenever visual content adds value to the query.

Overview

Media is not a standalone endpoint. It travels inside the object returned by the Perplexity Extract call, so you never issue a second request to obtain it. Whenever the underlying answer benefits from visual material — how-to walkthroughs, recognizable subjects, or breaking news — cloro collects the accompanying clips and pictures and exposes them under two arrays, result.videos and result.images.

You do not toggle a flag to request media. cloro relies on query relevance: send a natural prompt where visuals would help, and the arrays are populated automatically. Items keep the order Perplexity assigned to them, so index 0 is the highest-ranked result within each array. When no relevant media exists, the arrays are simply returned empty.

Example request

{
  "prompt": "how to change a bicycle tire",
  "country": "US"
}

A prompt like the one above typically yields both a videos and an images array in the response.

Media arrays

FieldTypeDescription
result.videosarrayVideo results Perplexity surfaced for the query, ranked best-first
result.imagesarrayImage results Perplexity surfaced for the query, ranked best-first

Media item fields

Every entry in either array shares the same shape. Image-specific dimensions are present on picture results and may be omitted for videos.

FieldTypeDescription
titlestringHuman-readable caption for the item
urlstringDirect link to the source video or image
thumbnailstringLink to a preview-sized thumbnail
mediumstringKind of asset, either video or image
sourcestringOriginating platform, e.g. youtube or stock_photo
image_widthnumberNative width of the full image, in pixels
image_heightnumberNative height of the full image, in pixels
thumbnail_widthnumberWidth of the thumbnail, in pixels
thumbnail_heightnumberHeight of the thumbnail, in pixels

Response example

{
  "success": true,
  "result": {
    "text": "Swapping a bicycle tire takes only a few tools and a repeatable set of steps...",
    "videos": [
      {
        "title": "Replace a Bike Tire in 5 Minutes",
        "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 and lever kit",
        "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
      }
    ]
  }
}

Notes