✨ Pexels AI CLI (px / pexels-cli)
A modern, high-performance command-line tool for Pexels, designed for Humans (Rich visual UI) and AI Agents / Classifiers (Machine-readable --json & --state JSONL output).
⚡ Key Features
- 🤖 Classifier-Ready JSONL Stream (
--state): Stream compact candidate objects with generatedstatestrings for non-generative decision models (Laya / System 1 classifiers):px videos --queries "black friday shopping,christmas shopping,checkout cart" \ --per-page 8 --state --dedupe > candidates.jsonl
- 🎯 Multi-Query Batch Execution (
--queries&--queries-file): Execute multiple search queries in a single CLI call. - 🧹 Deduplication (
--dedupe): Automatically deduplicate candidates by ID across multiple search queries. - 🔍 Field Filtering (
--fields): Keep only specified keys (e.g.--fields id,url,photographer,width,height) to reduce payload noise. - 🖼️ Dedicated Photo Search (
px search/px photos): Search stock photos with color hex codes, orientation, resolution, and localization filters. - 🎥 Dedicated Video Search (
px videos): Search HD & 4K stock video footage with aspect ratio and quality filtering. - 🧠 Multi-Provider AI Engine: Supports Google Gemini (
gemini-2.5-flash), OpenAI (gpt-4o-mini), and Ollama (Local LLMllama3.2). - ⚡ High-Speed Downloader: Async stream downloader with rich progress bars (
px download).
🚀 Global Installation
Option 1: Install globally via uv (Recommended)
uv tool install pexels-ai-cli
Option 2: Install via pip / pipx
pipx install pexels-ai-cli
🤖 Classifier Pipeline Integration (Laya / Decision Models)
Pipe candidate streams directly into typed-decision classification models:
px videos --queries "black friday shopping,online shopping,checkout cart" \
--per-page 8 --state --dedupe > candidates.jsonl
Output JSONL format (candidates.jsonl):
{"id": 5890229, "type": "video", "query": "black friday shopping", "photographer": "Pavel Danilyuk", "state": "a man shopping on black friday", "url": "https://www.pexels.com/video/a-man-shopping-on-black-friday-5890229/", "duration": 10, "width": 2160, "height": 3840}
📖 Usage Examples
1. Photo Search (Standard & AI)
# Standard Photo Search
px search "cyberpunk city" --color blue --orientation landscape
# Multi-query Photo Search with Field Filtering
px search --queries "mountains,forest,sunset" --fields id,url,photographer --json
# Smart AI Photo Search
px smart-photo "Dark moody tech background with subtle neon blue accents"
2. Video Search (Standard & AI)
# Standard Video Search
px videos "drone ocean waves" --orientation landscape
# Multi-query Video Search with State Generation
px videos --queries "city traffic,highway drone,night car" --state --dedupe
# Smart AI Video Search
px smart-video "Slow motion rainfall on city pavement"
3. Media Downloading
# Download photo by ID
px download 12377231 --output ./photo.jpg
# Download 4K video by ID
px download 25460961 --type video --output ./clip.mp4
📄 License
This project is licensed under the MIT License.
Metadata
Release files for pexels-ai-cli 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pexels_ai_cli-0.2.4.tar.gz | 88.5 kB | Without provenance | Details for pexels_ai_cli-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pexels_ai_cli-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for pexels_ai_cli-0.2.4-py3-none-any.whl |
Total release size: 111.4 kB
Release files / pexels_ai_cli-0.2.4.tar.gz
| Download URL | pexels_ai_cli-0.2.4.tar.gz |
|---|---|
| Size | 88.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6b06521a46f59b2b743818cf7b083beb7aa3dff38f03c73decf5fc008ff5038
|
|
BLAKE2b-256 checksum How to use checksums |
3f6ed8d786d04b058a7fa9b62190c7bd79857e1df2a755d7bfe348e3b23db718
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pexels_ai_cli-0.2.4-py3-none-any.whl
| Download URL | pexels_ai_cli-0.2.4-py3-none-any.whl |
|---|---|
| Size | 22.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c12f473093d2792648842be802d2a780763b9ca388dcc1332597d11714ea801
|
|
BLAKE2b-256 checksum How to use checksums |
9277e3b5bd25d891f86c4967ae7c255ffcea7cb05599d6af2ed384f9516abd5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pexels-ai-cli 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.