REST API · MCP · CLI
Search for footage, review the moment, then cut and download it. Use your existing ClipMyDia account through REST, hosted MCP or the local CLI and MCP server.
New account creation is paused. Existing users can sign in and connect their tools; an access request does not create an account.
Fast first task: connect search-only MCP and ask “Search ClipMyDia for 1980s hair salon archival footage. Show up to three candidates.” Discovery uses no account analysis credits. Inspect the footage before relying on a metadata match.
A key acts as its owning account: it can read credits and sources, run credit-funded moment analysis, import sources and create or download exports. It cannot manage billing, create keys or access another account. Keys are not limited to individual methods; choose a trusted integration and a separate key for each.
Revoke a key in the same account screen to reject new requests through REST, hosted MCP and CLI. Removing a server or running clipmydia logout does not revoke other copies. A signed download URL already issued can remain valid until its own expiry.
Authorization: Bearer YOUR_KEY.clipmydia_youtube_search.https://clipmydia.com/api/mcp?profile=searchA minimal call returns up to three compact candidates by default. Leave out optional fields when you do not need them.
{"query":"1980s hair salon archival footage"}The search profile accepts only query, optional maxResults (1–24) and view (compact, visual or full). Choose visual when you need thumbnails and watch/embed links:
{"query":"WWII aircraft archival footage -colorized -gameplay","maxResults":3,"view":"visual"}Already picked a hit? Use its ID to get preview links for that video in one metadata lookup. Replace the sample ID below with the one you chose.
{"query":"id:jNQXAC9IVRw","view":"visual"}A YouTube watch or share URL also works. For a description, choose full. An unavailable or non-embeddable video returns an empty list. Apply ranking, date, duration and license filters when searching by topic.
For filters, account balance, specs, moment analysis, imports, cuts and downloads, switch to the full server and refresh its tool list:
https://clipmydia.com/api/mcpOn the full server, start with clipmydia_account and clipmydia_specs. Hosted MCP returns temporary download links; it cannot read or write files on your computer. Use local MCP for file operations.
Install Node.js 22 or later, including npm. Run these commands in PowerShell, Terminal or your usual shell. The public package needs no GitHub account or private repository checkout.
npm install --global https://clipmydia.com/downloads/clipmydia-cli-0.1.12.tgz
clipmydia --version
clipmydia login
clipmydia accountCurrent client: 0.1.12. The package installs both clipmydia and clipmydia-mcp. Run the versioned install command again to update, then restart your MCP host.
Login opens your browser. Sign in, compare its code with your terminal and approve only a login you started. On a remote terminal use clipmydia login --no-open. Optional --email you@example.com requires the browser account’s verified primary address to match; it does not send mail or create an account.
The approval request expires after ten minutes. Current clients request access that lasts until revoked; older paired connections may expire after seven days. The private credential file ~/.clipmydia/credentials.json is shared with local MCP. Keep that file private.
For a manual key, run clipmydia login --token and paste it at the hidden prompt. --token is a switch, not a place to append your secret. A secret manager can pipe into clipmydia login --token-stdin.
clipmydia search --query "1980s hair salon archival footage" --view compact
clipmydia specsCompact search returns up to three candidates by default. Add --limit 6 for more, --view visual for preview links or --view full for details.
Install and pair the CLI first. Add a stdio server in your MCP host. If the host inherits your terminal’s PATH on macOS or Linux, use this search-only configuration:
{
"mcpServers": {
"clipmydia": {
"command": "clipmydia-mcp",
"args": [
"--profile",
"search"
],
"env": {
"CLIPMYDIA_API_URL": "https://clipmydia.com"
}
}
}
}For the full tools, change args to [] and restart the server. The full local server supports clipmydia_connect if pairing is still needed, plus local source uploads and downloads.
Some hosts cannot launch npm’s .cmd wrapper. After the global install, run this in PowerShell and paste its JSON into your host. It resolves your actual Node and npm paths.
$clipmydiaNode = (node --print process.execPath).Trim()
$clipmydiaModules = (npm root --global).Trim()
$clipmydiaMcp = Join-Path $clipmydiaModules '@clipmydia/cli/src/mcp.mjs'
if (-not (Test-Path -LiteralPath $clipmydiaMcp -PathType Leaf)) {
throw 'Install ClipMyDia with this Node/npm installation first.'
}
@{ mcpServers = @{ clipmydia = @{
command = $clipmydiaNode
args = @($clipmydiaMcp, '--profile', 'search')
env = @{ CLIPMYDIA_API_URL = 'https://clipmydia.com' }
} } } | ConvertTo-Json -Depth 5For the full local server on Windows, retain $clipmydiaMcp in args and remove only '--profile', 'search'.
Default MCP replies carry one JSON object in structuredContent and a short text pointer. For a host that reads text only, add CLIPMYDIA_MCP_RESULT_MODE: "text" to the local server’s env. The compatibility value legacy duplicates JSON in both channels and uses more context.
Upload/download tools use explicit file paths and return metadata; they do not insert media bytes or base64 into the conversation. Keep stdout reserved for MCP. Diagnostics go to stderr.
Base URL: https://clipmydia.com/api/v1. Use Authorization: Bearer YOUR_KEY and Content-Type: application/json for JSON bodies. Set CLIPMYDIA_TOKEN through your environment’s secret facility first.
curl --fail-with-body 'https://clipmydia.com/api/v1/account' \
-H "Authorization: Bearer $CLIPMYDIA_TOKEN"
curl --fail-with-body 'https://clipmydia.com/api/v1/search' \
-H "Authorization: Bearer $CLIPMYDIA_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"query":"1980s hair salon archival footage","view":"compact"}'$clipmydiaHeaders = @{ Authorization = "Bearer $env:CLIPMYDIA_TOKEN" }
Invoke-RestMethod -Uri 'https://clipmydia.com/api/v1/account' -Headers $clipmydiaHeaders
$clipmydiaSearch = @{ query = '1980s hair salon archival footage'; view = 'compact' } | ConvertTo-Json
Invoke-RestMethod -Uri 'https://clipmydia.com/api/v1/search' -Method Post -Headers $clipmydiaHeaders -ContentType 'application/json' -Body $clipmydiaSearchA compact response contains videos with id, title, channelTitle and durationSeconds, plus discoveryStatus: "metadata_only". IDs identify candidates, not guaranteed downloads.
Read the public search request schema for the machine-readable contract. Authenticated GET /api/v1/specs reports current limits and costs; GET /api/v1/account reports your credits.
Start with subject, era, action and visual style. Try these:
WWII aircraft archival footage black and white -colorized -gameplay1980s hair salon hairdressing archival footage1970s city street everyday life archival footageMetadata can match a colour slideshow or modern recreation. Upload dates are not filming dates. Review moving footage and source/license information; a Creative Commons filter is not rights clearance.
| JSON field | Values | CLI flag |
|---|---|---|
view | compact · visual · full | --view |
maxResults | 1–24 | --limit |
order | relevance · date · viewCount | --order |
videoDuration | any · short · medium · long | --duration |
videoLicense | any · creativeCommon | --license |
publishedAfter / publishedBefore | RFC3339 upload timestamps | --published-after / --published-before |
{"query":"WWII aircraft archival footage -colorized -gameplay","view":"visual","maxResults":3,"order":"relevance","videoDuration":"long"}compact keeps identification and duration. visual adds HTTPS thumbnail, watch and privacy-enhanced embed links. Both return up to three candidates by default. Explicit view: "full" adds detailed metadata and descriptions. In the search-only MCP profile, full still defaults to three candidates. The full-tool MCP profile defaults to six for full or no view; no view omits descriptions. REST and CLI default to 12 for full or no view.
Full-tool MCP and REST also accept includeDescriptions: false to omit description text in detailed results. Do not request descriptions with compact or visual views.
The small search-only MCP profile accepts no filters. Switch to the full profile for those fields. To find a downloadable archive instead, use full MCP clipmydia_archive with action: "search", or clipmydia archive-search --query "1980s hair salon" --limit 3, then list files and inspect their source/license metadata.
On the full hosted or local MCP server, use clipmydia_commons to discover video originals. Search uses no analysis credits and does not import or render a file.
{"query":"Apollo launch","maxResults":6}clipmydia commons-search --query "Apollo launch" --limit 6GET /api/v1/footage/commons?query=Apollo%20launch&maxResults=6Send the same Bearer header for REST. The query is 1–200 characters; the result limit is 1–12, default 6. Results include the title, preview URL where available, runtime, size, creator, license, source page, attribution and exact mediaUrl. Originals are limited to 150 MiB. Review the footage and reuse terms; a catalog license does not clear every use.
Pass the selected mediaUrl as url to the existing clipmydia_platform source/cut tool or platform REST endpoints below. The imported private project keeps sourceAttribution. Use that source’s own timeline for reviewed cuts, then the existing job and download tools. The Finder offers the same search under Wikimedia Commons. The search-only MCP profile stays YouTube-only.
Import a supported public video or audio URL, then export reviewed timestamps. Availability is checked per link. Public pages can still be unavailable; private, login, age, geographic and DRM restrictions are not bypassed. Review your right to use the footage.
clipmydia platform-cut --url "https://www.youtube.com/watch?v=jNQXAC9IVRw" --mark "00:00-00:02=Opening" --wait
clipmydia download --id JOB_UUID --output ./opening.mp4When the recording must come directly from YouTube, add --direct-only to the URL command. In the Finder, select YouTube source only. REST and MCP accept directOnly: true alongside the YouTube URL. If YouTube declines delivery, the import stops before a render is queued.
This sample requests the first two seconds of “Me at the zoo”; provider availability can change. Replace JOB_UUID with the returned job ID. For your own source, repeat --mark for up to eight cuts, each 1–300 whole seconds. One cut produces an MP4; multiple cuts produce a ZIP. Use a .zip output name for a batch.
For REST, send these bodies with the same Bearer and Content-Type headers. Keep the returned IDs:
POST /api/v1/footage/platform/source
{"url":"https://www.youtube.com/watch?v=jNQXAC9IVRw"}
POST /api/v1/footage/platform/cut
{"projectId":"PROJECT_UUID","moments":[{"title":"Opening","startSeconds":0,"endSeconds":2}]}The first response returns project.id. Replace PROJECT_UUID with it; the cut returns job.id. Poll GET /api/v1/jobs/JOB_UUID, then request GET /api/v1/jobs/JOB_UUID/download for the temporary file link. Do not forward the ClipMyDia Bearer key to storage.
On full MCP, use clipmydia_platform with {action:"cut",url,moments}, then clipmydia_wait with its returned jobId and clipmydia_download. Local download also needs an absolute outputPath; hosted download returns a link.
Choose preferred import quality in the Finder, --max-height in CLI URL imports or source resolution, or maxHeight in REST/MCP source requests and MCP URL cuts. Values are 360, 480 (default), 720, 1080 and 2160 (4K). Acquired video stays within the preference without upscaling. Verified archive and creator originals retain their bytes and dimensions. Availability and the 150 MiB/time limits still apply.
clipmydia platform-source --url "https://example.org/public-film.mp4" --max-height 1080
POST /api/v1/footage/platform/source
{"url":"https://example.org/public-film.mp4","maxHeight":1080}Source responses report requestedMaxHeight and the actual project.videoWidth / project.videoHeight; dimensions may be null for historical sources. The Finder shows the actual dimensions after import. Reuse the project ID for later cuts without a quality option: this uses the saved file and does not fetch it again. To change quality, import the URL again. Keep each source’s own timeline; an archive file can differ from a YouTube upload. Audio sources become waveform MP4s.
For reviewed YouTube timestamps, clipmydia export --video VIDEO_ID_11 --moments reviewed-cuts.json --wait or REST POST /api/v1/jobs with {videoId,moments,projectId?} automatically prepares a public source when no project is supplied. Source access can fail before rendering. These workflows do not run AI inference.
AI moment analysis is separately metered at 0.005 account credits per 1,000 reported tokens. It reserves credits before inference and returns unused authorization at settlement. Uncertain usage can remain held for reconciliation. Provider dollar prices and account credits are different measures.
Analysis covers 0–600 seconds by default; a selected region can span at most 600 seconds. --max-seconds caps each suggested clip at 1–300 seconds (default 30); it does not cap the analysis region. Filmed evidence is required by default, but suggestions still need playback and boundary review.
clipmydia moments --video VIDEO_ID_11 --query "a complete answer with the guest speaking on camera" --analysis-start 120 --analysis-end 180 --max-seconds 15 --idempotency-key interview-reply-001 > moments.jsonThis optional command spends account credits. REST uses POST /api/v1/moments and an Idempotency-Key header; MCP clipmydia_find_moments accepts idempotencyKey. After uncertainty, reuse the same key and exact input. A fresh key can create another paid request.
Account-wide limits: 10 YouTube discovery searches, 30 Commons searches and 10 export submissions per minute; five new source imports per five minutes; 30 API analyses per five minutes; one running API analysis at a time. All keys share limits. Read current specs before a larger workflow. Compact replies reduce conversation context, not upstream discovery quota cost.
These settings apply to yt-dlp on your own computer. ClipMyDia’s hosted YouTube importer uses a direct connection and accepts neither cookie files nor proxy settings. To edit footage you’ve already saved locally, upload the video to your project.
Start signed out for public videos. If your authorized source requires your own login, yt-dlp documents the following Chrome workflow. Using an account with yt-dlp carries a risk of account suspension.
https://www.youtube.com/robots.txt.youtube.com. The separate Export All Cookies action includes unrelated sites.youtube.com_cookies.txt, then close the Incognito window. Keep the file in a private, unsynced folder outside your project. Anyone with the file could use your signed-in session. Remove it when you’re done.Replace the example path and VIDEO_ID in this Windows command.
yt-dlp --cookies "C:\private\youtube.com_cookies.txt" "https://www.youtube.com/watch?v=VIDEO_ID"The combined --cookies-from-browser and --cookies export reads cookies across your regular browser profile and misses this Incognito session. YouTube cookie instructions · yt-dlp cookie FAQ
Supply an HTTP, HTTPS or SOCKS endpoint you control or have permission to use. Replace the example address and video ID.
yt-dlp --proxy "http://proxy.example:8080" "https://www.youtube.com/watch?v=VIDEO_ID"yt-dlp takes one proxy URL per invocation. If you distribute jobs across your own proxy pool, pick an endpoint before starting each video and keep that exit through the metadata lookup and every media fragment. A media URL can be tied to the IP that requested it. Choose the next endpoint after the job finishes.
For a temporary network error, use a small retry limit and increase the delay between attempts. For a rate limit, pause the queue for the requested interval. A human-verification prompt needs attention before the queue resumes. Proxy options · Media URLs and IP addresses
This warning comes from YouTube’s player JavaScript. yt-dlp needs a supported JavaScript runtime and matching yt-dlp-ejs scripts. The official Windows executable bundles the scripts. If you installed yt-dlp with pip, update the package and scripts together using the Python environment for that installation.
python -m pip install -U "yt-dlp[default]"Deno 2.3 or later is enabled by default when installed. If you use Node.js 22 or later, enable it explicitly. This example lists the available formats.
node --version
yt-dlp --js-runtimes node -F "https://www.youtube.com/watch?v=VIDEO_ID"A sign-in or human-verification message concerns access to the source. Updating the JavaScript runtime addresses player-script processing. yt-dlp runtime and script setup
structuredContent.error.userAction.url.clipmydia login again, check the browser account and compare the new code. Optional --email must match its verified primary address. The short approval deadline is separate from key lifetime.npm root --global and the Windows configuration above for hosts that cannot launch .cmd files.structuredContent. For a text-only local host, set CLIPMYDIA_MCP_RESULT_MODE=text. Avoid legacy unless the host needs duplicated output.Retry-After. Limits are shared across account keys; creating another key does not increase them. Discovery uses provider quota even when it spends no account analysis credits.clipmydia job --id JOB_UUID --wait or MCP clipmydia_wait. If submission itself was uncertain, inspect account jobs before resubmitting..mp4 for one cut and .zip for a batch. Keep signed links private.--api-url or CLIPMYDIA_API_URL intentionally. Saved credentials are bound to an origin. Reconnect for a different deployment; the client does not forward a saved key elsewhere.For help, keep the sanitized error code, client version, connection profile and relevant project/job ID. Exclude keys, credential files, signed URLs and private footage.