BatchEdits API
Edit videos in bulk over HTTP: captions, silence and filler-word removal, 9:16 crop, zooms, B-roll, hooks and AI clips. The same operations as the MCP server and the CLI.
Authentication
Create an API key in Settings and send it in the x-api-key header (or Authorization: Bearer). Base URL: https://batchedits.com/api/v1. Edits use the video credits on your plan, trial or free videos; everything else is free.
Quick start
1.Check your key and see your styles. Every account can also use the popular ones by id: popular:bold, popular:beasty, popular:classy, popular:gta6 (or copy any reel's look with POST /styles/copy).
terminalcurl https://batchedits.com/api/v1/styles \ -H "x-api-key: $BATCHEDITS_API_KEY"2.Import a video from a link and start the edit. One video credit; it runs in the background.
terminalcurl -X POST https://batchedits.com/api/v1/videos \ -H "x-api-key: $BATCHEDITS_API_KEY" -H "Content-Type: application/json" \ -d '{"video_url": "https://www.youtube.com/shorts/VIDEO_ID", "style_id": "popular:bold"}'3.Check until status is completed (usually a few minutes).
terminalcurl https://batchedits.com/api/v1/videos/VIDEO_ID \ -H "x-api-key: $BATCHEDITS_API_KEY"4.Get the edited file.
terminalcurl https://batchedits.com/api/v1/videos/VIDEO_ID/download \ -H "x-api-key: $BATCHEDITS_API_KEY"
Up to 50 videos at once
Send up to 50 links in one request. It answers at once with a batch id; the videos import and start editing in the background. A folder on your computer? Upload the files (below), or use the CLI, which uploads files directly.
curl -X POST https://batchedits.com/api/v1/videos/batch \
-H "x-api-key: $BATCHEDITS_API_KEY" -H "Content-Type: application/json" \
-d '{"video_urls": ["https://…/clip-1.mp4", "https://…/clip-2.mp4"], "style_id": "STYLE_ID"}'
# then
curl https://batchedits.com/api/v1/batches/BATCH_ID -H "x-api-key: $BATCHEDITS_API_KEY"Upload a file
For a file on your computer, of any size. The file goes straight to storage in 16 MB parts, so it also works through proxies such as treg.
# 1. Start: name and size in bytes
curl -X POST https://batchedits.com/api/v1/uploads -H "x-api-key: $BATCHEDITS_API_KEY" -H "Content-Type: application/json" \
-d '{"name": "talk.mp4", "size": 52428800}'
# → {"upload_id": "VIDEO_ID", "part_size": 16777216, "part_count": 4, ...}
# 2. For each part n: get a signed link, PUT that 16 MB slice, keep the ETag header
curl -X POST https://batchedits.com/api/v1/uploads/VIDEO_ID/parts/1 -H "x-api-key: $BATCHEDITS_API_KEY"
# → {"url": "https://…", "byte_range": [0, 16777216], ...}
dd if=talk.mp4 bs=16M skip=0 count=1 2>/dev/null | curl -sS -X PUT --data-binary @- -D - "SIGNED_URL" | grep -i etag
# 3. Finish (and start the edit)
curl -X POST https://batchedits.com/api/v1/uploads/VIDEO_ID/complete -H "x-api-key: $BATCHEDITS_API_KEY" -H "Content-Type: application/json" \
-d '{"parts": [{"part_number": 1, "etag": "\"…\""}], "style_id": "STYLE_ID"}'Endpoints
Styles
/stylesList your stylesstyles: your own styles, with each one's edits. popular: styles every account can use by id, such as popular:bold (bold word-by-word captions, silences cut), popular:beasty, popular:classy and popular:gta6 (AI clips for gaming streams). Free; also the way to check an API key (an invalid key gets 401).
/stylesCreate a styleA style is a set of edits run on every video it's applied to. Include an edit's key to turn it on; {} uses its defaults.
namerequired · Name of the styledescription· What it doeseditsrequired · see the OpenAPI schema
{
"name": "Reels: captions + silence cut",
"edits": {
"crop": {
"aspectRatio": "9:16"
},
"removeSilence": {},
"captions": {}
}
}/styles/copyCopy the style of a videoCreates a style that copies a reference video's look: captions (font, colours, highlight, position), zooms and crop. Reads the first 90 seconds and takes 20 to 60 seconds. Uses no video credits; 10 copies a day.
video_url· A public link to a video: YouTube (watch, youtu.be or Shorts), a Twitch past broadcast or clip, or a direct link to a video file (mp4, Dropbox, Google Drive).video_id· One of your uploaded videos, instead of video_urlname· Name for the new style
{
"video_url": "https://www.instagram.com/reel/XXXXXXXXXXX/"
}/styles/{id}Rename a stylenamedescription
/styles/{id}/editsChange a style's editsEach key in changes replaces that edit's settings (or turns it on); null turns it off; keys left out stay as they are.
changesrequired · see the OpenAPI schema
{
"changes": {
"removeSilence": {
"fillerWords": false
},
"broll": null
}
}Videos
/videosList your videosNewest first, with each video's status and a link to watch it.
status· Only videos with this statuslimit· How many to return
/videosImport a video from a link (and edit it)Downloads the video into your account. With style_id it also starts the edit, which uses one video credit and runs in the background: poll GET /videos/{id} until status is completed, then GET /videos/{id}/download. Without style_id importing is free. If the edit can't start, the answer is an error (not billed) and still names the imported video.
video_urlrequired · A public link to a video: YouTube (watch, youtu.be or Shorts), a Twitch past broadcast or clip, or a direct link to a video file (mp4, Dropbox, Google Drive).style_id· Start the edit with this style right after importing: an id from GET /styles, or a popular one such as popular:boldname· Name for the videostart_seconds· YouTube or Twitch links only: import from here (seconds)end_seconds· YouTube or Twitch links only: import up to here, at most 2 hours after start_seconds
{
"video_url": "https://www.youtube.com/shorts/XXXXXXXXXXX",
"style_id": "STYLE_ID"
}/videos/batchImport up to 50 links (and edit them)Answers at once (202) with a batch id; the links are imported 3 at a time in the background and, with style_id, each edit is started (one credit per video). Follow it with GET /batches/{id}.
video_urlsrequiredstyle_id· Edit every video with this style
{
"video_urls": [
"https://example.com/clip-1.mp4",
"https://example.com/clip-2.mp4"
],
"style_id": "STYLE_ID"
}/batches/{id}Follow a batchEach link's import, and the live status of each video it made. Kept for 7 days.
/videos/downloadDownload links for several videosvideo_idsrequired
/videos/{id}Get a videoIts status (uploading, uploaded, queued, processing, completed, failed), progress and any error. A completed AI-clips video lists its clips with clipOf.
/videos/{id}/processEdit a video with a styleStarts the edit in the background (202) and uses one video credit. Poll GET /videos/{id} until status is completed. Editing a finished video again replaces its edited file.
style_idrequired · The style to apply: an id from GET /styles, or a popular one such as popular:bold
/videos/{id}/downloadDownload link for a videoA temporary link to the edited file. A video that isn't finished gets 409 with its status.
Uploads
/uploadsStart uploading a fileFor a video file you have locally (no size limit). Creates the video and returns upload_id, part_size (16 MB) and part_count. For each part, get a signed link (POST /uploads/{id}/parts/{n}), PUT that slice of the file to it and keep the ETag response header; then POST /uploads/{id}/complete. The file goes straight to storage. Uploads expire after 24 hours.
namerequired · The file's name, e.g. talk.mp4sizerequired · The file's size in bytes
{
"name": "talk.mp4",
"size": 52428800
}/uploads/{id}/parts/{n}Get a signed link for one partReturns url and byte_range. PUT exactly those bytes of the file to url (no auth header), and keep the ETag the PUT answers with. Links last an hour; ask again for a new one.
/uploads/{id}/completeFinish an upload (and edit it)Joins the parts into the video. With style_id it also starts the edit (one video credit); poll GET /videos/{id} until completed.
partsrequiredstyle_id· Start the edit with this style
{
"parts": [
{
"part_number": 1,
"etag": "\"9b2cf535f27731c974343645a3985328\""
},
{
"part_number": 2,
"etag": "\"6f5902ac237024bdd0c176cb93063dc4\""
}
],
"style_id": "STYLE_ID"
}Captions
/videos/{id}/captionsGet a video's caption wordsEach word with its id and start time. The first call on a new video can start transcription: status then says to try again shortly.
include_removed· Also list words cut from the video
/videos/{id}/captionsFix caption wordsReplace words everywhere, change single words by id, or cut words out of the video (and restore them). Process the video again to render the change.
replacementswordsremove· Word ids to cut out of the videorestore· Removed word ids to put back
{
"replacements": [
{
"find": "batch edits",
"replace": "BatchEdits"
}
]
}/videos/{id}/textSet a video's hook or call-to-action lineUsed when the video is edited with a style that has a hook or cta edit. Set it before processing.
hook_text· The hook line; empty clears itcta_text· The call to action; empty goes back to the style's line
Clips
/hook-clipsSearch intro (hook) clipsShort vertical clips a style's video hook can play before every video.
query· What the clip shows, e.g. surprise reaction
/clipsList your B-roll clipsThe clips a style's broll edit cuts to (matched by name), and which of your videos are used as B-roll.
/clipsAdd a B-roll clipName it for what it shows: the broll edit matches clips to what the speaker says by name. Only the first minute of a link is kept.
name· What the clip showsvideo_url· A public link to a video: YouTube (watch, youtu.be or Shorts), a Twitch past broadcast or clip, or a direct link to a video file (mp4, Dropbox, Google Drive).video_id· One of your videos (up to a minute), instead of video_urltags
/clips/{id}Rename a B-roll clipnametags
/clips/{id}Remove a B-roll clipStyles stop cutting to it. A clip that is one of your videos keeps the video.
Errors
Errors are JSON: {"error": "…"}, written to show to a person. A failed request uses no credits.
400· Something in the request is wrong; error says what.401· Missing or invalid API key.402· No videos left on your plan.404· That video, style or clip isn't in your account.409· Not possible yet, e.g. downloading a video that isn't finished (the body has its status).429· A limit was reached (imports at once, imports or style copies a day). Try again later.
OpenAPI
The full spec, with every style edit and its settings: https://batchedits.com/api/v1/openapi.json. Questions: hello@batchedits.com