search_stock_media
Searches the Pexels stock library (photos or videos) with the user's connected API key. Returns items with id, dimensions, duration (videos), author, thumbnail url, available video qualities, and a downloaded flag telling whether the asset is already in the project's media pool. If no key is connected the tool errors — TELL THE USER to open Library → Generators → Stock Library and connect their Pexels key. Results are subject to the Pexels license; keep the author attribution when asked about provenance.
LOOK AT THE THUMBNAIL BEFORE YOU DOWNLOAD. Results are matched on the uploader's WORDS, not on what is in the frame — a search for 'earth from space' returns the Moon, other planets and artists' renders, and they all look plausible in a result list. Fetch the returned thumbnail url and actually view it. Picking on the title alone is how the wrong subject ends up in a finished video. See read_skill {topic:'verify'}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | photos | videos | |
| page | No | 1-based page, 40 items per page. | |
| size | No | Optional: large | medium | small | |
| color | No | Optional, photos only: a Pexels color name. | |
| query | No | Search phrase; empty = curated/popular feed. | |
| token | Yes | The session token `connect` returned. Pass it on every call — it says which browser to drive. | |
| projectId | Yes | Project id from get_projects. | |
| orientation | No | Optional: landscape | portrait | square |