Home · Developers
SDK & API

Embed private, on-device media search in your own app.

The same engine behind the MediaFind app — transcription, semantic search, and grounded Ask — as a typed Python SDK and a versioned HTTP API. On-device, keyless, on-prem-ready. Nothing uploaded.

Try Pro free for 7 days → Using an AI agent? MCP →

One engine, three surfaces. The Python SDK, the /api/v1 HTTP API, and the MCP server all run the same local engine as the desktop app and CLI — so a library you index once is reachable from whichever surface fits your stack.

Python SDK

Not publicly installable yet. The Python SDK and the mediafind command line (which runs mediafind serve below) aren't on PyPI yet: the mediafind package there is a placeholder that holds the name, not this SDK. To connect an AI agent today, use the MCP server built into the MediaFind app — see the agent setup guide.

This is what the SDK looks like. Heavy models load lazily, so import mediafind stays cheap:

from mediafind import Engine

with Engine() as mf:                      # default library (respects MEDIAFIND_DATA)
    mf.index("~/Movies")                  # transcribe + embed a file or folder
    hits = mf.search("the part about pricing", k=5)
    answer = mf.ask("what did we decide about pricing?")
    print(answer["answer"], answer["citations"])

Point at a specific library with Engine("/path/to/index.sqlite3"). Optional capabilities (CLIP visual search, a local LLM for Ask, faces) are used when they're installed, and the engine degrades gracefully without them.

MethodReturnsWhat it does
index(paths, **opts)summary dictTranscribe + embed a file, folder, or list.
search(query, k=5, …)list of hitsSemantic search over transcript segments with timestamps.
ask(question, …)answer dictGrounded Q&A with cited sources (a local LLM when installed, else extractive).
transcript(media_path)dictTranscript, summary, and segments for one indexed file.
status()dictEntitlement (Pro/free/trial), index quota, and version.

HTTP API

Prefer to call it over the wire, or embed from a non-Python stack? Start the local server and hit the versioned /api/v1 routes:

mediafind serve            # local HTTP API on http://localhost:8000
curl -X POST http://localhost:8000/api/v1/search \
  -H 'content-type: application/json' \
  -d '{"query": "the part about pricing", "k": 5}'
EndpointWhat it does
POST /api/v1/searchSemantic / multimodal search; ranked clips with timestamps.
POST /api/v1/askGrounded answer with cited sources + timestamps.
GET /api/v1/transcriptTranscript, summary, and segments for one indexed file.
GET /api/v1/statusEntitlement, index quota, and engine version.

/api/v1 is a frozen, versioned contract — separate from the app's internal routes — so you can build against it and not chase UI changes. Request and response shapes are typed; new optional fields may be added, but existing ones won't change without a major-version bump.

On-prem. mediafind serve binds to localhost by default. To serve it across your network, run mediafind serve --host 0.0.0.0: a non-loopback bind requires a bearer token you set via MEDIAFIND_AUTH_TOKEN, plus TLS (--ssl-keyfile/--ssl-certfile) — or an explicit --allow-insecure-lan to accept the risk.

Stays on your machine

Indexing, search, transcript reads, and Ask all run against a local index with no network calls; Ask stays keyless — a local LLM synthesizes answers when one is installed, otherwise you get a cited extractive answer. There are no API keys and no per-call cloud costs. A free tier caps indexed files; a Pro subscription unlocks unlimited indexing and the Pro-only channels. Engine.status() (or GET /api/v1/status) reports the current entitlement.

Build private media search into your product.

7-day free trial, no account. Unlock the full local engine with Pro — from $8.99/month billed annually.

Try Pro free for 7 days → For AI agents (MCP) →