Image Search
By Steven Van ·
Developers can filter sources and formats in Agent API requests, with successful searches costing $2.50 per 1,000 calls.
Photographs, diagrams and illustrations from the web can now appear as structured results during a Perplexity Agent API request. The new image_search tool returns image URLs and source-page URLs separately from the assistant’s text.
Control sources and formats
Developers enable image_search in a request’s tools list. Each call returns up to five images by default, with a configurable limit from 1 to 30. Domain filters can include or exclude up to 10 domains, but cannot mix both modes. Format filters support BMP, GIF, JPEG, PNG, WebP and SVG. Safe-search filtering is enabled by default.
Read results and streaming events
An image_search_results output item appears before the final assistant message. Each result includes the image URL, source-page URL and dimensions in pixels, with an optional title or description. A successful search with no matches returns an empty results array.
Streaming requests emit separate events when the search starts and when results arrive, matched by call_id. The completed response also includes the structured results item.
Per-call pricing
Successful calls cost $2.50 per 1,000 invocations. Failed searches return an empty results array with an image_search_failed error and have zero tool cost. The Image Search documentation includes request examples in Python, TypeScript and cURL.