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
| Field | Type | Description |
|---|---|---|
| result.videos | array | Video results Perplexity surfaced for the query, ranked best-first |
| result.images | array | Image 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.
| Field | Type | Description |
|---|---|---|
| title | string | Human-readable caption for the item |
| url | string | Direct link to the source video or image |
| thumbnail | string | Link to a preview-sized thumbnail |
| medium | string | Kind of asset, either video or image |
| source | string | Originating platform, e.g. youtube or stock_photo |
| image_width | number | Native width of the full image, in pixels |
| image_height | number | Native height of the full image, in pixels |
| thumbnail_width | number | Width of the thumbnail, in pixels |
| thumbnail_height | number | Height 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
- Media is delivered with the primary Extract response; no extra call or credit-bearing request is required.
- Both arrays can be empty when the query has no relevant visual results — check length before iterating.
- Thumbnails are convenient for list previews, while
urlpoints at the full-resolution asset. - Questions about media coverage or field values can be sent to [email protected].