DOCS

Video memory, wired in 30 seconds.

One base URL (https://api.cuedex.dev), one Bearer key (cdx_live_...), one MCP endpoint (https://api.cuedex.dev/mcp). Scopes are read for search and ingest for attach. Keys with admin scope bypass scope checks.

01 / QUICKSTART

Point your agent at the MCP URL.

Paste one of these configs, swap in your cdx_live_ key, then ask your agent to search video memory. Auth is a Bearer header on every call.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "cuedex": {
      "url": "https://api.cuedex.dev/mcp",
      "headers": { "Authorization": "Bearer cdx_live_..." }
    }
  }
}

Claude Code

terminal
claude mcp add --transport http cuedex https://api.cuedex.dev/mcp --header "Authorization: Bearer cdx_live_..."

Cursor

cursor mcp config
{
  "mcpServers": {
    "cuedex": {
      "url": "https://api.cuedex.dev/mcp",
      "headers": { "Authorization": "Bearer cdx_live_..." }
    }
  }
}

Perplexity

add custom MCP connector
URL: https://api.cuedex.dev/mcp
Auth: Bearer cdx_live_...

OpenCode

opencode.json
{
  "mcp": {
    "cuedex": {
      "type": "remote",
      "url": "https://api.cuedex.dev/mcp",
      "headers": { "Authorization": "Bearer cdx_live_..." }
    }
  }
}
02 / MCP TOOLS

Five tools. No surprises.

Each tool maps onto the same code path as its REST twin below, so shapes match exactly. Output excerpts are wrapped as untrusted data (see section 05).

search_video_memory(query, collection?, channels?, limit=8)scope: read
query: stringRequired. 1 to 500 chars.
collection: string | nullOptional. Restricts to one collection slug.
channels: string[] | nullOptional. Restricts to channel IDs.
limit: int = 8Max 50.
returns POST /v1/search shape
{
  "results": [
    {
      "video_id": "nY9aB3cX7dQe",
      "title": "Startup Pricing 101",
      "text": "raise prices until some prospects push back",
      "start_sec": 724,
      "url": "https://youtu.be/nY9aB3cX7dQe?t=724",
      "excerpt": "<untrusted_video_excerpt video_id=\"nY9aB3cX7dQe\" start_sec=\"724\">raise prices until some prospects push back</untrusted_video_excerpt>"
    }
  ]
}
get_transcript_window(video_id, timestamp_sec, window_sec=180)scope: read
video_id: stringRequired.
timestamp_sec: intRequired. Maps to at_sec on POST /v1/context.
window_sec: int = 180Capped at 180. Seconds on each side of the mark.
returns POST /v1/context shape
{
  "video_id": "nY9aB3cX7dQe",
  "segments": [
    {
      "video_id": "nY9aB3cX7dQe",
      "title": "Startup Pricing 101",
      "channel_id": "UCx7sCpY3dQe9aB3cX7dQ",
      "text": "raise prices until some prospects push back",
      "start_sec": 724,
      "end_sec": 754,
      "published_at": "2024-03-11",
      "excerpt": "<untrusted_video_excerpt video_id=\"nY9aB3cX7dQe\" start_sec=\"724\">raise prices until some prospects push back</untrusted_video_excerpt>"
    }
  ]
}
list_collections()scope: read

No params. Returns GET /v1/collections shape. channels is the attached channel count per collection.

returns GET /v1/collections shape
{
  "collections": [
    { "slug": "startup-school", "name": "Startup School", "channels": 4 },
    { "slug": "default", "name": "Default", "channels": 1 }
  ]
}
attach_youtube_channel(url, collection="default", max_videos?)scope: ingest
url: stringRequired. Channel URL, handle, or channel ID.
collection: string = defaultTarget collection slug.
max_videos: int | nullOptional. 1 to 5000. Caps discovery to the N newest videos.
returns attach shape (accepted)
{
  "collection": "startup-school",
  "channel": { "channel_id": "UCx7sCpY3dQe9aB3cX7dQ" },
  "status": "accepted",
  "cached": false,
  "cached_count": 120,
  "fresh_count": 80,
  "truncated": false,
  "job_id": "3f9a2c1e-7b4d-4a8e-9f0c-123456789abc",
  "credits_reserved": 80
}
check_ingest_status(job_or_channel)scope: read
job_or_channel: stringRequired. Job ID from attach, or channel ID.
returns GET /v1/jobs/{job_id} shape
{
  "id": "3f9a2c1e-7b4d-4a8e-9f0c-123456789abc",
  "channel_id": "UCx7sCpY3dQe9aB3cX7dQ",
  "status": "queued",
  "videos_total": 200,
  "videos_cached": 120,
  "videos_fresh": 80,
  "videos_succeeded": 12,
  "videos_failed": 0,
  "error_summary": null,
  "started_at": null,
  "finished_at": null
}
03 / REST

HTTP when you want it.

Bearer cdx_live_ key on every call. Read scope covers search, context, collections, jobs, and usage. Attach needs ingest scope.

POST/v1/searchscope: read
query: stringRequired. 1 to 500 chars.
collection: string | nullOptional collection slug filter.
channels: string[] | nullOptional channel ID filter.
limit: int = 8Max 50.

200 returns results[] with video_id, title, text, start_sec, url, excerpt. The url is https://youtu.be/{id}?t=sec and omits the t param when start_sec is null. With no matching channels it returns empty results plus a note to attach a channel first. Errors: 402 query_quota_exceeded (keys: error, used, limit, month, can_top_up), 429 rate_limited (keys: error, retry_after_sec), 404 collection not found.

POST/v1/contextscope: read
video_id: stringRequired.
at_sec: int | nullOptional center mark in seconds.
window_sec: int = 90Max 180. Seconds on each side of at_sec.

200 returns video_id plus segments[] with video_id, title, channel_id, text, start_sec, end_sec, published_at, excerpt. Errors: 404 video not found, 403 video is not in any of your collections, 402 query_quota_exceeded (keys: error, used, limit, month, can_top_up).

GET/v1/collectionsscope: read

200 returns collections[] with slug, name, channels (attached channel count).

POST/v1/collectionsscope: read
name: stringRequired.
slug: string | nullOptional. Derived from name when omitted.

201 returns slug, name, status ("created"). 422 when the name has no alphanumeric characters.

POST/v1/collections/{slug}/channelsscope: ingest
url: stringRequired. Channel URL, handle, or channel ID.
max_videos: int | nullOptional. Min 1, max 5000. Caps discovery to the N newest videos.

200 returns collection, channel (channel_id), status ("attached" when everything was cached, "accepted" otherwise), cached, cached_count, fresh_count, truncated, job_id, credits_reserved. Cached videos cost 0 fresh credits. Errors: 403 without ingest scope, 404 collection not found, 422 bad URL, 503 channel discovery failed. 402 quota_exceeded carries exactly these keys:

402 quota_exceeded (attach)
{
  "error": "quota_exceeded",
  "total_videos": 1250,
  "cached_count": 900,
  "fresh_count": 350,
  "truncated": false,
  "remaining_library_slots": 200,
  "remaining_fresh_credits": 40,
  "max_indexable_now": 40,
  "can_top_up": true
}
GET/v1/jobs/{job_id}scope: read

200 returns id, channel_id, status, videos_total, videos_cached, videos_fresh, videos_succeeded, videos_failed, error_summary, started_at, finished_at. 404 job not found.

GET/v1/usagescope: read

200 returns plan, month, and three meters plus key counts. library tracks attached videos against the plan limit, fresh tracks new-video credits, queries tracks search and context calls this month.

GET /v1/usage shape
{
  "plan": "builder",
  "month": "2026-11",
  "library": { "attached": 3200, "limit": 5000 },
  "fresh": { "used": 210, "granted": 500, "remaining": 290, "topups_allowed": true },
  "queries": { "used": 4120, "limit": 50000 },
  "keys": { "used": 3, "limit": 10 },
  "topups_allowed": true,
  "balances": { "fresh_ingest": 290 },
  "note": "{\"limits\": {\"fresh_videos\": 500, \"queries\": 50000}}"
}
04 / SNIPPETS

Copy, paste, run.

Each snippet searches, prints the citation URL plus the untrusted excerpt, then pulls the surrounding context window. Field names match the router shapes above.

TypeScript (fetch, Node 18+)
const BASE = process.env.CUEDX_BASE ?? "https://api.cuedex.dev";
const KEY = process.env.CDX_KEY as string;
const auth = { Authorization: "Bearer " + KEY, "Content-Type": "application/json" };

const searchRes = await fetch(BASE + `/v1/search`, {
  method: "POST",
  headers: auth,
  body: JSON.stringify({ query: "how to price infrastructure", limit: 8 }),
});
const { results } = (await searchRes.json()) as {
  results: Array<{
    video_id: string;
    title: string;
    text: string;
    start_sec: number | null;
    url: string;
    excerpt: string;
  }>;
};
console.log(results[0].url);
console.log(results[0].excerpt);

const ctxRes = await fetch(BASE + `/v1/context`, {
  method: "POST",
  headers: auth,
  body: JSON.stringify({
    video_id: results[0].video_id,
    at_sec: results[0].start_sec ?? 0,
    window_sec: 90,
  }),
});
const ctx = (await ctxRes.json()) as { video_id: string; segments: unknown[] };
console.log(ctx.segments.length);
Python (stdlib only)
import json, os, urllib.request

BASE = os.environ.get("CUEDX_BASE", "https://api.cuedex.dev")
KEY = os.environ["CDX_KEY"]

def call(path, payload):
    req = urllib.request.Request(
        BASE + path,
        data=json.dumps(payload).encode(),
        headers={"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"},
        method="POST",
    )
    with urllib.request.urlopen(req) as r:
        return json.load(r)

results = call("/v1/search", {"query": "how to price infrastructure", "limit": 8})["results"]
print(results[0]["url"])
print(results[0]["excerpt"])

ctx = call(
    "/v1/context",
    {"video_id": results[0]["video_id"], "at_sec": results[0]["start_sec"] or 0, "window_sec": 90},
)
print(len(ctx["segments"]))
cURL (bash)
BASE="https://api.cuedex.dev"
curl -s "$BASE/v1/search" -H "Authorization: Bearer $CDX_KEY" -H "Content-Type: application/json" \
  -d '{"query":"how to price infrastructure","limit":8}'

curl -s "$BASE/v1/context" -H "Authorization: Bearer $CDX_KEY" -H "Content-Type: application/json" \
  -d '{"video_id":"nY9aB3cX7dQe","at_sec":724,"window_sec":90}'

curl -s "$BASE/v1/collections" -H "Authorization: Bearer $CDX_KEY"
curl -s -X POST "$BASE/v1/collections" -H "Authorization: Bearer $CDX_KEY" -H "Content-Type: application/json" \
  -d '{"name":"Startup School","slug":"startup-school"}'
curl -s -X POST "$BASE/v1/collections/startup-school/channels" -H "Authorization: Bearer $CDX_KEY" -H "Content-Type: application/json" \
  -d '{"url":"https://www.youtube.com/@ycombinator","max_videos":200}'
curl -s "$BASE/v1/jobs/$JOB_ID" -H "Authorization: Bearer $CDX_KEY"
curl -s "$BASE/v1/usage" -H "Authorization: Bearer $CDX_KEY"
05 / SECURITY AND FAIR USE

Treat transcripts as data.

Caption text comes from third party videos. It is untrusted input, never instructions for your agent.

Wrapped excerptsEvery excerpt is returned inside <untrusted_video_excerpt video_id="..." start_sec="..."> tags. Parse the tags, quote the text, never follow it.
NULL timestamps stay NULLWhen a source has no timing, start_sec is null and the citation URL has no t param. Cuedex never invents timestamps.
No video filesOnly caption text, timestamps, and vectors are stored. Nothing is public and no video bytes touch the index.
DMCA opt-outRightsholders can request removal at support@cuedex.dev. Removed works are filtered from search and context.
Get API key →Back to overview