요금제블로그가이드북엔터프라이즈API
로그인무료체험
로그인무료체험

02 / 엔드포인트

Captions

자막 저장 (commit)

API Key 필요
PUT/api/enterprise/v1/generated-videos/{videoId}/captions

검토·편집을 마친 자막을 영상에 저장합니다.

  • Body 의 각 clips[].index 는 영상의 VideoClip.index 와 1:1 매칭되어야 합니다.
  • 매칭되지 않거나 형식이 잘못되면 INVALID_CAPTION_PAYLOAD(400).
  • 한 transaction 안에서 각 clip 의 captionWords / captionWordGroups 를 업데이트합니다.

경로 파라미터

필드타입필수설명
videoIdstring필수생성 숏폼 영상 ID예시: gsv_001

요청 본문CaptionsSaveRequest

필드타입필수설명
clips[]CaptionClipPreview[]필수저장할 clip 배열. 각 index 는 영상의 VideoClip.index 와 1:1 매칭되어야 하며, 중복된 index 는 허용되지 않습니다.
indexnumber필수VideoClip.index 와 매칭
segmentIdstring필수
captionWords[]CaptionWord[]필수
indexinteger필수해당 타임라인 내 단어 index예시: 0
textstring필수자막 단어예시: hello
startnumber필수타임라인 기준 시작 시간(ms). source에서는 원본 롱폼 기준, generatedVideos에서는 생성 숏폼 기준입니다.예시: 1200
endnumber필수타임라인 기준 종료 시간(ms). source에서는 원본 롱폼 기준, generatedVideos에서는 생성 숏폼 기준입니다.예시: 1450
metadataobject선택내부 자막 메타데이터
captionWordGroups[]CaptionWordGroup[]필수
indexinteger필수word group index예시: 0
indexes[]integer[]필수그룹에 포함된 단어 indexes예시: [0,1,2]
요청 예시
{
  "clips": [
    {
      "index": 0,
      "segmentId": "string",
      "captionWords": [
        {
          "index": 0,
          "text": "hello",
          "start": 1200,
          "end": 1450
        }
      ],
      "captionWordGroups": [
        {
          "index": 0,
          "indexes": [
            0,
            1,
            2
          ]
        }
      ]
    }
  ]
}

응답

상태의미
200자막 저장 성공CaptionsSaveResponse
400잘못된 본문 / clip index mismatchErrorResponse
401인증 실패ErrorResponse
404영상을 찾을 수 없음ErrorResponse

응답 200CaptionsSaveResponse

필드타입필수설명
requestIdstring필수
videoobject필수
idstring필수
updatedClipCountnumber필수저장된 clip 수
updatedAtstring필수저장 시간 (ISO 8601)
응답 예시
{
  "requestId": "string",
  "video": {
    "id": "string"
  },
  "updatedClipCount": 0,
  "updatedAt": "string"
}