Download media
download_mediaDownload Pexels photos and videos by ID to a local directory. Returns file paths, sizes, and ready-to-use attribution lines without using API quota.
Instructions
Download one or more photos/videos by #id to a local directory (default ./pexels-media, override with directory or the PEXELS_DOWNLOAD_DIR env var). Streams to disk, returns file paths, sizes, and ready-to-use attribution lines. Downloads don't consume API quota.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| directory | No | Target directory (absolute path recommended) | |
| photo_size | No | original=full resolution, large2x≈1880px wide, large≈940px, medium=350px tall, small=130px tall. Use original/large2x for real content work. | original |
| video_quality | No | hd |