API, CLI and MCP
Everything the Studio does in the browser, you can do from Claude Code, Cursor, Codex, a shell script or your own app: cut pauses and ums, burn in captions, write titles, description and chapters, clip Shorts, and read your niche research.
Quick start
- Create an API key at Studio → API & MCP. Keys start with
ytp_. Treat them like a password. - Pick how you want to connect: MCP for AI agents, the CLI for your terminal, or the REST API.
- Edits use the same minutes as the website: the length of the raw video you upload.
MCP server
The server speaks the Model Context Protocol over streamable HTTP at https://youtubepilot.com/mcp. Authenticate with your key as a bearer token.
Claude Code
claude mcp add --transport http youtubepilot https://youtubepilot.com/mcp \
--header "Authorization: Bearer ytp_YOUR_KEY"
Then ask in plain words, for example: “Edit ~/Movies/take3.mov with razor cuts and green captions, give me 3 Shorts, and pick the best title for my niche.” Claude uploads the file with create_upload, waits with get_edit and downloads the results.
Cursor, Windsurf and other clients
{
"mcpServers": {
"youtubepilot": {
"url": "https://youtubepilot.com/mcp",
"headers": { "Authorization": "Bearer ytp_YOUR_KEY" }
}
}
}
Tools
| Tool | What it does |
|---|---|
create_upload | Starts an edit for a local file. Returns an upload URL and a ready-to-run curl command; the edit starts when the upload completes. |
edit_video | Edits a video from a direct link (Dropbox, Google Drive, S3 or any https file). YouTube links are not supported. |
get_edit | Progress while it runs; when done, download links (valid 24 hours), stats, titles, description with chapters, tags, thumbnail text, hook feedback and Shorts. |
rerender_edit | Renders again with new settings. Reuses the transcript and uses no extra minutes. |
list_edits | Recent edits and minutes left. |
list_workspaces, get_ideas, get_gaps, ask | Your niche research: video ideas backed by competitor breakouts, topics you haven’t covered, and answers from competitors’ transcripts. |
CLI
ytpilot is a single Python file (3.8+, no dependencies).
curl -fsSL https://youtubepilot.com/install.sh | sh
ytpilot login ytp_YOUR_KEY
ytpilot edit video.mp4
It uploads in resumable 16 MB chunks, shows progress, and saves the edited MP4, captions.srt, transcript.txt, the Shorts and package.json (titles, description, chapters, tags) into video-ytpilot/ next to your file.
ytpilot edit take.mov --pauses razor --captions boxed --highlight green --shorts 2
ytpilot edit take.mov --no-fillers --captions none -o final.mp4
ytpilot edit take.mov --json # machine-readable result for agents and scripts
ytpilot list # recent edits and minutes left
ytpilot ideas | ytpilot gaps | ytpilot ask "what are people asking about pricing?"
Set YOUTUBEPILOT_API_KEY instead of ytpilot login in CI.
Edit local files by their transcript
For big files you don't want to upload: the video stays on your computer. Only its audio is sent for transcription (16 kHz Opus, a few MB an hour, whatever the video weighs). Cutting runs locally with ffmpeg on the original, at full resolution. You need ffmpeg installed (brew install ffmpeg).
ytpilot open talk.mov # an editor in your browser: select words, press Delete, Export
ytpilot transcribe talk.mov # writes talk.mov.transcript.txt
ytpilot cut talk.mov # renders talk-edited.mp4 next to the original
In the browser editor, click a word to jump there, select words and press Delete to cut them, and choose how tight the pauses are and whether the ums go. Playback skips what you cut. Export writes an H.264 MP4 at the original resolution, or ProRes 422 HQ for more editing in Premiere, Resolve or Final Cut. HDR footage (iPhone HLG) stays 10-bit HDR.
With Claude Code or any text editor, delete words or whole lines from talk.mov.transcript.txt and run ytpilot cut. Only deletions count, so fixing a typo keeps its audio. Keep the [m:ss] marks: they tell repeated takes apart, and when the same words appear twice the later take is kept. For example: "Remove the false starts and the bit about pricing from talk.mov.transcript.txt, then run ytpilot cut talk.mov --pauses tight."
ytpilot cut talk.mov --pauses tight --fillers # also shorten pauses and cut um/uh
ytpilot cut talk.mov --prores -o talk-cut.mov # ProRes for your editing app
ytpilot cut talk.mov --dry-run --json # the cut plan, without rendering
Transcription uses your editing minutes, by the length of the audio. Edits are saved in talk.mov.ytpilot.json, so you can close the editor and pick up where you left off.
REST API
Base URL https://youtubepilot.com. Send Authorization: Bearer ytp_… on every request. Bodies and responses are JSON, except the upload, which is raw bytes.
1. Create the edit
curl -s https://youtubepilot.com/api/edits \
-H "Authorization: Bearer $YTP" -H "Content-Type: application/json" \
-d '{"name": "take.mp4", "size": 734003200, "settings": {"pauses": "tight"}}'
# → {"edit": {"id": 42, "state": "uploading", ...}, "upload_url": ".../api/edits/42/upload", "chunk_size": 16777216}
2. Upload
PUT the bytes at ?offset=N. Send the whole file at once, or in chunks. If a chunk is sent at the wrong offset you get 409 with received (the bytes already stored), so you can resume. Add &start=1 to start the edit as soon as the last byte arrives, or call POST /api/edits/42/start.
curl -X PUT "https://youtubepilot.com/api/edits/42/upload?offset=0&start=1" \
-H "Authorization: Bearer $YTP" --data-binary @take.mp4
3. Poll
curl -s https://youtubepilot.com/api/edits/42 -H "Authorization: Bearer $YTP"
# state: uploading → queued → processing → done (or error)
Other endpoints
| Endpoint | |
|---|---|
POST /api/edits/transcribe | Raw audio body (?language=auto|en|…): word timings for local editing. Counts as minutes of editing. |
POST /api/edits/import | {"url", "settings"}: edit from a direct link. |
GET /api/edits | Recent edits and your allowance. |
POST /api/edits/{id}/rerender | {"settings"}: render again with new settings. |
DELETE /api/edits/{id} | Delete the edit and its files now. |
GET /api/edits/{id}/files/{name} | Download an output. Links returned to API keys are signed (?t=) and work without a header for 24 hours. |
Edit settings
| Key | Values | Default |
|---|---|---|
pauses | natural (keeps a breath), tight, razor (jump cuts), off | tight |
fillers | true cuts “um”, “uh”, “erm” and similar on the exact syllable | true |
captions | pop (word-by-word highlight), clean, boxed, none | pop |
highlight | yellow, green, red, cyan, white | yellow |
uppercase | Pop captions in capitals | true |
shorts | 0 to 5 vertical clips (Free: 1) | 3 |
language | auto or a two-letter code such as en, es, hi | auto |
Results
A finished edit has video_url, files (MP4, SRT, TXT), shorts (each with url, title, hook, duration), stats (source_duration, duration, removed, cuts, fillers_removed) and package:
{
"titles": [{"title": "...", "why": "..."}], // 5 options
"description": "...", "description_full": "... with chapters",
"chapters": [{"t": 0, "title": "..."}],
"tags": ["..."], "thumbnail_text": ["..."],
"hook": {"score": 7, "note": "..."}, // your first 30 seconds
"pinned_comment": "...",
"niche_titles_used": 12 // breakout titles from your niche it learned from
}
Titles are modeled on your competitors’ breakout videos when you have a niche workspace.
Limits
- Minutes per plan: Free 15 in total, Starter 120, Creator 480, Studio 1,500 a month. Longest video: 15, 60, 120 and 180 minutes. See pricing.
- Uploads up to 2 GB. MP4, MOV, M4V, MKV, WEBM, AVI, MTS, MPG, 3GP and WMV.
- Output is H.264/AAC MP4 at the source resolution, up to 1080p.
- Files are deleted 48 hours after an edit finishes.
- Errors come back as
{"error": {"code", "message"}}.402means the plan limit was reached; the body names the plan that allows it.