All docs

    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. 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).

      terminal
      curl https://batchedits.com/api/v1/styles \
        -H "x-api-key: $BATCHEDITS_API_KEY"
    2. 2.Import a video from a link and start the edit. One video credit; it runs in the background.

      terminal
      curl -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. 3.Check until status is completed (usually a few minutes).

      terminal
      curl https://batchedits.com/api/v1/videos/VIDEO_ID \
        -H "x-api-key: $BATCHEDITS_API_KEY"
    4. 4.Get the edited file.

      terminal
      curl 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.

    terminal
    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.

    terminal
    # 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

    get/stylesList your styles

    styles: 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).

    post/stylesCreate a style

    A 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 style
    • description · What it does
    • editsrequired · see the OpenAPI schema
    {
      "name": "Reels: captions + silence cut",
      "edits": {
        "crop": {
          "aspectRatio": "9:16"
        },
        "removeSilence": {},
        "captions": {}
      }
    }
    post/styles/copyCopy the style of a video

    Creates 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_url
    • name · Name for the new style
    {
      "video_url": "https://www.instagram.com/reel/XXXXXXXXXXX/"
    }
    patch/styles/{id}Rename a style
    • name
    • description
    patch/styles/{id}/editsChange a style's edits

    Each key in changes replaces that edit's settings (or turns it on); null turns it off; keys left out stay as they are.

    {
      "changes": {
        "removeSilence": {
          "fillerWords": false
        },
        "broll": null
      }
    }

    Videos

    get/videosList your videos

    Newest first, with each video's status and a link to watch it.

    • status · Only videos with this status
    • limit · How many to return
    post/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:bold
    • name · Name for the video
    • start_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"
    }
    post/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_urlsrequired
    • style_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"
    }
    get/batches/{id}Follow a batch

    Each link's import, and the live status of each video it made. Kept for 7 days.

    post/videos/downloadDownload links for several videos
    • video_idsrequired
    get/videos/{id}Get a video

    Its status (uploading, uploaded, queued, processing, completed, failed), progress and any error. A completed AI-clips video lists its clips with clipOf.

    post/videos/{id}/processEdit a video with a style

    Starts 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
    get/videos/{id}/downloadDownload link for a video

    A temporary link to the edited file. A video that isn't finished gets 409 with its status.

    Uploads

    post/uploadsStart uploading a file

    For 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.mp4
    • sizerequired · The file's size in bytes
    {
      "name": "talk.mp4",
      "size": 52428800
    }
    post/uploads/{id}/parts/{n}Get a signed link for one part

    Returns 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.

    post/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.

    • partsrequired
    • style_id · Start the edit with this style
    {
      "parts": [
        {
          "part_number": 1,
          "etag": "\"9b2cf535f27731c974343645a3985328\""
        },
        {
          "part_number": 2,
          "etag": "\"6f5902ac237024bdd0c176cb93063dc4\""
        }
      ],
      "style_id": "STYLE_ID"
    }

    Captions

    get/videos/{id}/captionsGet a video's caption words

    Each 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
    patch/videos/{id}/captionsFix caption words

    Replace 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.

    • replacements
    • words
    • remove · Word ids to cut out of the video
    • restore · Removed word ids to put back
    {
      "replacements": [
        {
          "find": "batch edits",
          "replace": "BatchEdits"
        }
      ]
    }
    patch/videos/{id}/textSet a video's hook or call-to-action line

    Used 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 it
    • cta_text · The call to action; empty goes back to the style's line

    Clips

    get/hook-clipsSearch intro (hook) clips

    Short vertical clips a style's video hook can play before every video.

    • query · What the clip shows, e.g. surprise reaction
    get/clipsList your B-roll clips

    The clips a style's broll edit cuts to (matched by name), and which of your videos are used as B-roll.

    post/clipsAdd a B-roll clip

    Name 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 shows
    • 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 videos (up to a minute), instead of video_url
    • tags
    patch/clips/{id}Rename a B-roll clip
    • name
    • tags
    delete/clips/{id}Remove a B-roll clip

    Styles 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