SDKs

SDKs

Pureframe provides official client libraries generated directly from the API spec, so they’re always in sync with the latest endpoints.

Python

$pip install pureframe
1from pureframe import Pureframe
2
3client = Pureframe(api_key="pf_key_...")
4
5# Create a collection
6collection = client.collections.create(name="Product demos")
7
8# Upload a video
9job = client.upload(
10 collection_id=collection.data.id,
11 file=open("demo.mp4", "rb")
12)
13
14# Poll until done
15import time
16while True:
17 status = client.jobs.get(job.data.job_id)
18 if status.data.status == "done":
19 break
20 time.sleep(5)
21
22# Search
23results = client.search(
24 query="pricing objection",
25 collection_id=collection.data.id
26)
27for video in results.data:
28 for seg in video.segments:
29 print(f"{video.filename} @ {seg.timestamp_start:.1f}s — {seg.score:.2f}")

TypeScript / Node.js

$npm install pureframe
1import { Pureframe } from "pureframe"
2import * as fs from "fs"
3
4const client = new Pureframe({ apiKey: "pf_key_..." })
5
6// Create a collection
7const collection = await client.collections.create({ name: "Product demos" })
8
9// Upload a video
10const job = await client.upload({
11 collectionId: collection.data.id,
12 file: fs.createReadStream("demo.mp4"),
13})
14
15// Poll until done
16let done = false
17while (!done) {
18 const status = await client.jobs.get(job.data.jobId)
19 if (status.data.status === "done") done = true
20 else await new Promise(r => setTimeout(r, 5000))
21}
22
23// Search
24const results = await client.search({
25 query: "pricing objection",
26 collectionId: collection.data.id,
27})
28for (const video of results.data) {
29 for (const seg of video.segments) {
30 console.log(`${video.filename} @ ${seg.timestampStart}s — score: ${seg.score}`)
31 }
32}

MCP package

For AI agent integrations, install the Pureframe MCP server:

$npx pureframe-mcp

See the MCP guide for setup instructions for Claude Desktop, Claude Code, Cursor, and Windsurf.

REST API

All SDKs wrap the same REST API. If you prefer to call it directly or need a language not listed above, see the API Reference — every endpoint, parameter, and response field is documented there.

$curl -X POST https://api.pureframe.ai/v1/search \
> -H "Authorization: Bearer pf_key_..." \
> -F "query=person waving at the camera"