User Manual & Technical Reference

StockFinder AI Documentation

How to set up StockFinder AI and turn a script into an organized Pexels b-roll pack.

Version 1.6.0 · Last updated November 12, 2026 · 7 min read

1. Step-by-step guide

From raw script to organized b-roll pack in five steps.

1

Set up StockFinder

Setup Phase

Follow the setup guide when you first open StockFinder.

  1. Choose an AI app on this computer, or enter an API key for Gemini, OpenAI, or OpenRouter.
  2. Paste your free Pexels API Key.
  3. Use the test buttons to check your keys.
  4. On the review screen, add any missing keys and keep or change the download folder. If you chose an AI app, follow its connection guide next.

Tip: To review candidates before they save, turn on "Require Human Approval Before Download".

2

Create a New Asset Pack

Project Setup

Click "Create Asset Pack" in the sidebar and fill in:

  • Project Title: also names the folder (e.g. The Future of Artificial Intelligence).
  • Video Script: your narration or scene outline.
  • Platform Layout:
    • YouTube (16:9) — horizontal footage.
    • Shorts / TikTok / Reels (9:16) — vertical, centered subjects.
    • Square (1:1) — social feeds.
  • Visual Mood: steers the searches (e.g. Cinematic, High Tech, Moody Documentary, Warm & Lifestyle, Abstract).
  • Asset Mix Type: "Videos Only", "Photos Only" or "Videos + Photos".
  • Asset Limits: max per beat (e.g. 2–3) and per project (e.g. 15–25).
3

Launch the AI Stock Scout

Agent Run

Click "Analyze & Fetch Visual Assets" to open the Agent Run Progress view:

  1. Script Segmentation: the LLM splits the narration into VisualBeat segments.
  2. Visual Direction: each beat gets a direction and search keywords.
  3. Tool Calling: the agent runs search_pexels_videos and search_pexels_photos and scores the results.
  4. Live Console: follow queries, responses and token costs as they happen.
4

Review & Approve Candidates (Optional)

Human In The Loop

With Human Approval Mode on, the agent pauses after picking candidates:

  • Each beat card shows its shortlisted thumbnails.
  • Click a card for resolution, size and photographer.
  • Approve or reject with one click.
  • Click "Approve & Download" to start downloading.
5

Inspect in Media Library & Export Attribution

Export & Cut

When downloads finish, open the Media Library:

  • Media Player: preview and scrub clips (via the media:// protocol).
  • Open in Folder: "Reveal in Folder" shows the file in your file explorer.
  • Export Attribution: "Copy Attribution" copies a credits list for your description.

2. API keys

No subscription, no StockFinder servers. You connect two keys of your own:

Required Pexels API Key

Millions of free photos and videos.

Cost: Free.
Rate Limit: 200/hour, 20,000/month.
Get it: pexels.com/api

Required LLM Provider API Key

Reads the script and writes the searches. Choose one:

• Google Gemini: Gemini 2.5 Flash / 1.5 Pro
• OpenAI: GPT-4o / GPT-4o-mini
• OpenRouter: Claude 3.5, Mistral, Llama 3
Cost: ~$0.01 to $0.03 per script run.

Keys are encrypted with your OS key vault:

  • Windows: DPAPI via Electron safeStorage.
  • macOS: Keychain via Electron safeStorage.
  • Linux: Secret Service API / Libsecret.

3. Overview

StockFinder AI is a free, MIT-licensed desktop app for YouTube creators, editors and video teams.

Creators often spend 2 to 4 hours per project guessing keywords, downloading clips one by one and tracking credits by hand.

StockFinder AI automates that:

  • Script Decomposition: an LLM splits the script into visual beats.
  • Visual Translation: metaphors become concrete, searchable shots.
  • Media Search: the official Pexels API finds HD/4K clips and photos for your aspect ratio and mood.
  • Parallel Downloader: saves the picks into a structured project folder.
  • Automatic Attribution: a credits manifest and description block, per the Pexels License.

Note: StockFinder AI is not a video editor. It finds and bundles stock for your timeline.

4. The agent loop

StockFinder AI runs a tool-calling agent loop, not keyword swaps. The agent reaches Pexels and the disk through four tools:

Agent Tool Contract — Core IPC Execution TypeScript
// 1. Search Pexels Photos for a specific beat
search_pexels_photos({ beatId, query, orientation, size, color, page, perPage })

// 2. Search Pexels Videos for a specific beat
search_pexels_videos({ beatId, query, orientation, size, page, perPage })

// 3. Select candidates with reasoning & log rejections
select_assets_for_download({
  selections: [{ beatId, assetType: 'video', pexelsId: 123456, reason: 'Matches moody lighting' }],
  rejections: [{ beatId, assetType: 'photo', pexelsId: 789012, reason: 'Wrong framing' }]
})

// 4. Trigger download queue with optional approval lock
download_selected_assets({ assets: [{ assetType: 'video', pexelsId: 123456 }] })

Rate limits & caching: searches are cached locally for 1 hour to save your Pexels quota, and failed requests retry with backoff.

5. Review controls

You decide what gets saved:

  • Review Lock: with requireApprovalBeforeDownload on, the run pauses after selection (awaiting_user_approval).
  • Per-Asset Decisions: accept or reject each clip.
  • Resume: pause or close the app and pick up where you left off.
  • Rerun: retry failed beats or whole projects in one click.

6. Folder and manifest

Each project gets its own folder:

Project Directory Tree Local Filesystem
MyDownloadFolder/
└── the-future-of-artificial-intelligence/
    ├── manifest.json         # Full project settings, visual beats, and media metadata
    ├── agent-log.jsonl       # Structured JSON log of all agent thoughts, tool calls, and timings
    ├── videos/               # High-resolution MP4/WebM video files
    │   ├── beat_1_1234567_futuristic_city.mp4
    │   └── beat_2_8901234_robot_hands.mp4
    ├── photos/               # High-resolution JPG/PNG/WebP image files
    │   └── beat_3_5678901_microchip.jpg
    └── thumbnails/           # Low-resolution previews for quick UI inspection

7. Importing into your editor

Files are standard MP4 and JPG with clean names, so importing takes seconds:

Adobe Premiere Pro

Drag the folder into the Project Panel. The videos/ and photos/ bins carry over.

DaVinci Resolve

Drag the folder into the Media Pool.

Final Cut Pro

Import the folder as a Keyword Collection to tag and search clips.

CapCut Desktop

Drag videos/ into the Media Import tab.

8. Attribution and license

Pexels media is free for commercial and non-commercial use under the Pexels License. Credit isn't required, but photographers appreciate it.

StockFinder AI builds the block in one click:

Sample attribution block Text
Stock footage provided by Pexels:
- Futuristic City by Jane Doe (https://www.pexels.com/@janedoe)
- Robotic Arm by John Smith (https://www.pexels.com/@johnsmith)
- Data Server Room by Media Producer (https://www.pexels.com/@producer)

Curated with StockFinder AI (https://stockfinderai.birol.tech)

9. Performance and safety settings

In Settings:

  • Max Concurrent Downloads: 1 to 5 parallel downloads.
  • Request Timeout: how long to wait on an API call (default 30 seconds).
  • Avoid Faces and People: favors objects, nature and places over close-ups of people.
  • Skip Explicit Queries: strips adult, violent or sensitive terms from searches.

10. Architecture

The stack:

  • Electron 39: desktop shell with context isolation.
  • React 19 & Vite: the renderer, with hot reload.
  • Tailwind CSS 4: styling.
  • Zustand: state management.
  • Node.js IPC: a sandboxed main process for files, crypto and network.

Build from source:

Terminal — Build from Source Bash
# 1. Clone repository
git clone https://github.com/birol-dev/Pexels.git
cd Pexels

# 2. Install dependencies
npm install

# 3. Start in development mode (hot reload)
npm run dev

# 4. Build native desktop installer
npm run build:win   # Windows installer (.exe)
npm run build:mac   # macOS app bundle (.dmg)
npm run build:linux # Linux AppImage & .deb

11. Troubleshooting

"Invalid Pexels API Key" Error

Check the key has no extra spaces and that your pexels.com/api application is approved.

"LLM Rate Limit (429)" Error

Switch to a lighter model in Settings (e.g. gpt-4o to gpt-4o-mini, or gemini-1.5-pro to gemini-2.5-flash) or raise the timeout.

Missing Video Previews in Media Library

Videos play through a custom media:// protocol. If one won't play, check that H.264/WebM codecs are installed.

Can I run StockFinder AI without internet?

No. The app runs locally, but a run needs internet to reach your LLM and Pexels.