download_stock_media
Downloads one Pexels asset into the project's media pool as a virtual file at the Library root (name pexels-<id>.jpg|.mp4). Asynchronous: the first call accepts the download and returns its state; CALL AGAIN with the same arguments to poll — state becomes 'done' with the asset's mediaRef, ready for add_clips. maxHeight picks the best video rendition not exceeding it (default: the best available).
ASK FOR THE WHOLE SHOT LIST AT ONCE — three files stream at a time and the rest wait their turn, so a batch is queued for you, in the order you asked. State 'queued' is normal and needs no action but polling.
ONCE DOWNLOADED, CHECK THE MOMENT YOU MEAN TO USE — not just the first frame. A clip that opens on your subject can cut away, change subject or hold a logo exactly where you planned to trim. Read the scene samples from get_media, or render frames with inspect_media, across the range you intend to cut. See read_skill {topic:'verify'}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | photo | video | |
| token | Yes | The session token `connect` returned. Pass it on every call — it says which browser to drive. | |
| pexelsId | Yes | The item id from search_stock_media. | |
| maxHeight | No | Videos only: cap the rendition height (e.g. 1080). | |
| projectId | Yes | Project id from get_projects. |