A local, self‑hosted service that continuously searches public internet sources for AI API keys, validates them against the respective providers, and stores the results in a local SQLite database.
- Discover API keys for popular AI services (OpenAI, Anthropic, Gemini, Kimi, OpenRouter, Amazon Bedrock, Codex, etc.) in public GitHub repositories, Gists, configuration files, and environment variables.
- Validate each key with a lightweight test request (e.g. a cheap completion or model list call) to confirm it works and is still active.
- Deduplicate – keep a record of URLs already scanned so we never double‑search.
- Persist results (key, provider, validation status, timestamp, source URL) in a local SQLite DB.
- Run 24/7 on your laptop. Optionally containerised with gluetun for network privacy.
- Isolated – no ties to your personal GitHub account; you can host the repo on a separate organization or keep it purely local.
# Clone the repo (or just use the local copy created by the assistant)
cd ~/codeWS/Python/FleaMarketAI
# Install deps
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# Run the service (will loop forever, sleeping 4 h between runs)
python -m src.mainThe docker-compose.yml starts two containers:
- gluetun – provides a VPN‑like tunnel and can expose an HTTP proxy.
- flea‑market‑ai – runs the Python service inside the gluetun network.
cd ~/codeWS/Python/FleaMarketAI
docker compose up -d # builds and starts the containersThe service will log to logs/ inside the container (mounted as a volume).
FleaMarketAI/
├─ config.yaml # provider‑specific endpoint config
├─ requirements.txt # Python dependencies
├─ Dockerfile # builds the Python app
├─ docker-compose.yml # gluetun + app services
├─ logs/ # runtime logs (mounted as volume)
│ └─ processed_urls.txt # URLs already scanned
├─ db/ # SQLite DB (mounted as volume)
│ └─ keys.db
└─ src/
├─ __init__.py
├─ main.py # orchestrator loop
├─ discover.py # crawls GitHub, Gists, files, env vars
├─ validate.py # provider‑specific validation helpers
└─ db.py # SQLite CRUD utilities
- Add the provider name and a simple test endpoint to
config.yaml. - Implement a function
validate_<provider>(key)insrc/validate.pythat returnsTrue/Falseand an optional message. - Register the function in the
VALIDATORSmapping at the bottom ofvalidate.py.
- This tool only reads public information; it never accesses private repositories or secrets without explicit permission.
- Use responsibly. Scanning public repos for leaked keys is legal in many jurisdictions, but do not misuse discovered keys.
- The validation calls are cheap (e.g., list models) to avoid costly usage.
Built with love on your self‑hosted DGX Spark‑backed machine