Skip to main content
First month 50% off for new accounts, in their first 48 hoursStart free

Change captions

Changes how a video's captions look, corrects misheard words in captions or sets an opening headline over the picture. Only the fields you send change, and you must send at least one change besides version.

MCP tooledit_captions
APIPOST /api/v1/videos/{clipId}/captions
CreditsFree

When to use it

  • Call after get_script returns status: "ready" to style captions, fix misheard names or terms, or add a headline.
  • Send all caption changes in one call using the script's current version.
  • To cut spoken words from the video and audio, use cut_video instead; replace edits caption text only.

Parameters

NameTypeRequiredWhat it is
clipIdstringYesThe clipId from open_video, or a clip ID from list_clips.
versionintegerYesThe version the script was read at.
stylestringNo"highlight": capitals, each word lights up as it is said. "clean": smaller, plain. "bold": capitals, plain. "boxed": on a black box. One of highlight, clean, bold, boxed.
positionstringNoWhere the captions sit. One of top, middle, bottom.
sizestringNoOne of S, M, L.
textColorstringNoOne of white, yellow, pink, blue, green, orange.
highlightColorstringNoThe color of the word being said, in "highlight". One of white, yellow, pink, blue, green, orange.
replacelistNoUp to 50. Corrects the captions wherever they say "from", such as a misspelt name. If one "from" is not in the captions, nothing is changed. What is heard does not change.
replace[].fromstringYesThe words to correct, up to 200 characters.
replace[].tostringYesWhat the captions should say, up to 200 characters.
headlinestringNoA short title over the picture for the first seconds, up to 70 characters. An empty string takes it off.

Call it from an AI agent

{
  "name": "edit_captions",
  "arguments": {
    "clipId": "f8669b08",
    "version": 1,
    "style": "boxed",
    "replace": [
      {
        "from": "pod clip",
        "to": "Pogclip"
      }
    ]
  }
}

Call it from your code

curl -X POST https://pogclip.com/api/v1/videos/f8669b08/captions \
  -H "Authorization: Bearer $POGCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version": 1, "style": "boxed", "replace": [{"from": "pod clip", "to": "Pogclip"}]}'

What you get back

{
  "clipId": "f8669b08",
  "name": "Why I started filming again",
  "pageUrl": "https://pogclip.com/dashboard/projects/8e4ed643?clip=f8669b08",
  "downloadPageUrl": "https://pogclip.com/dashboard/projects/8e4ed643?download=f8669b08",
  "status": "ready",
  "version": 2,
  "durationSeconds": 194.5,
  "script": [
    {
      "line": 1,
      "start": 0.1,
      "end": 2,
      "text": "Okay, here's the deal."
    },
    {
      "line": 2,
      "start": 2.3,
      "end": 8.1,
      "text": "I want to show you what I got wrong."
    }
  ],
  "previousVersion": 1,
  "next": "Saved. Version 1 can be put back. The script shows what is heard, so corrected captions are not in it."
}

The example above shows only the first two lines of script.

  • version: the new version after saving; use it for any follow-up edits.
  • previousVersion: pass this to restore_video to undo the caption change.
  • script: still shows what was heard in the audio, so replace corrections do not appear in script.
  • next: confirms the change was saved and notes which version you can restore.

Errors

CodeWhat it means
video_changedThe video has a newer version than the one you sent. Read the script again and use its version.
invalid_requestA field is missing or wrong, or the video has no transcript yet.
not_foundThere is no video with this ID on the account, or it has expired.
unauthorizedThe API key or sign-in is missing, wrong or revoked.
rate_limitedMore than 60 requests in a minute. Wait for retryAfterSeconds.