> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reap.video/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Clip

> Update a clip's title and caption

> **For AI agents:** a documentation index is at [/llms.txt](/llms.txt). Every page is also available as markdown, just append `.md` to the URL.

## Overview

Update the title and/or caption of an existing clip. Clips that are still processing cannot be updated.

## Rate Limiting

This endpoint is rate limited to 10 requests per minute per API key.

<Note>
  Cannot update clips that are still processing. Title is limited to 80 characters and caption to 250 characters.
</Note>

<Note>
  Clips belonging to a cancelled project can't be edited. The API returns `400` — *"This project was cancelled and can no longer be modified or published."*
</Note>

## Response

<ResponseField name="id" type="string">
  Unique identifier for the clip
</ResponseField>

<ResponseField name="projectId" type="string">
  ID of the parent project
</ResponseField>

<ResponseField name="clipUrl" type="string">
  Direct download URL for the final clip (includes captions if enabled)
</ResponseField>

<ResponseField name="clipWithCaptionsUrl" type="string" optional>
  **Deprecated.** Use `clipUrl` instead, which now includes captions when enabled.
</ResponseField>

<ResponseField name="startTime" type="number">
  Start time of the clip in the original video (seconds)
</ResponseField>

<ResponseField name="endTime" type="number">
  End time of the clip in the original video (seconds)
</ResponseField>

<ResponseField name="duration" type="number">
  Duration of the clip in seconds
</ResponseField>

<ResponseField name="topic" type="string">
  Primary topic or theme of the clip
</ResponseField>

<ResponseField name="title" type="string">
  Updated title for the clip
</ResponseField>

<ResponseField name="caption" type="string">
  Updated caption/description for the clip
</ResponseField>

<ResponseField name="language" type="string">
  Language of the clip content
</ResponseField>

<ResponseField name="translateTranscription" type="boolean">
  Whether transcription is translated
</ResponseField>

<ResponseField name="translationLanguages" type="array">
  Array of languages for translation
</ResponseField>

<ResponseField name="dubbingLanguage" type="string" optional>
  Target dubbing language (for dubbing projects)
</ResponseField>

<ResponseField name="transcriptionScript" type="string">
  Script format for transcription ("native" or "roman")
</ResponseField>

<ResponseField name="viralityScore" type="number">
  AI-predicted virality score (0-10, higher is better)
</ResponseField>

<ResponseField name="reframeClips" type="boolean">
  Whether this clip is reframed
</ResponseField>

<ResponseField name="exportResolution" type="integer">
  Resolution of the exported clip
</ResponseField>

<ResponseField name="exportOrientation" type="string">
  Orientation of the exported clip ("landscape", "portrait", "square")
</ResponseField>

<ResponseField name="captionsPreset" type="string">
  Caption style preset used for this clip
</ResponseField>

<ResponseField name="enableCaptions" type="boolean">
  Whether captions are enabled for this clip
</ResponseField>

<ResponseField name="enableEmojis" type="boolean">
  Whether emojis are added to captions
</ResponseField>

<ResponseField name="enableHighlights" type="boolean">
  Whether keyword highlighting is enabled
</ResponseField>

<ResponseField name="metadata" type="object">
  Clip metadata including technical details
</ResponseField>

<ResponseField name="createdAt" type="integer">
  Unix timestamp when the clip was created
</ResponseField>

<ResponseField name="updatedAt" type="integer">
  Unix timestamp when the clip was last updated
</ResponseField>

## Example Request

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -X POST "https://public.reap.video/api/v1/automation/update-clip" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
      "clipId": "65f1a2b3c4d5e6f7a8b9c0d4",
      "title": "Updated Clip Title",
      "caption": "A new caption for this clip"
    }'
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch('https://public.reap.video/api/v1/automation/update-clip', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      projectId: '65f1a2b3c4d5e6f7a8b9c0d2',
      clipId: '65f1a2b3c4d5e6f7a8b9c0d4',
      title: 'Updated Clip Title',
      caption: 'A new caption for this clip'
    })
  });

  const clip = await response.json();
  console.log(`Updated: ${clip.title}`);
  ```

  ```python Python theme={"system"}
  import requests

  headers = {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
  }

  data = {
      'projectId': '65f1a2b3c4d5e6f7a8b9c0d2',
      'clipId': '65f1a2b3c4d5e6f7a8b9c0d4',
      'title': 'Updated Clip Title',
      'caption': 'A new caption for this clip'
  }

  response = requests.post(
      'https://public.reap.video/api/v1/automation/update-clip',
      headers=headers,
      json=data
  )

  clip = response.json()
  print(f"Updated: {clip['title']}")
  ```

  ```php PHP theme={"system"}
  <?php
  $data = [
      'projectId' => '65f1a2b3c4d5e6f7a8b9c0d2',
      'clipId' => '65f1a2b3c4d5e6f7a8b9c0d4',
      'title' => 'Updated Clip Title',
      'caption' => 'A new caption for this clip'
  ];

  $ch = curl_init('https://public.reap.video/api/v1/automation/update-clip');
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Bearer YOUR_API_KEY',
      'Content-Type: application/json'
  ]);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($ch);
  curl_close($ch);
  $clip = json_decode($response, true);
  echo 'Updated: ' . $clip['title'] . "\n";
  ?>
  ```

  ```go Go theme={"system"}
  package main
  import (
      "bytes"
      "encoding/json"
      "fmt"
      "io/ioutil"
      "net/http"
  )
  func main() {
      data := map[string]string{
          "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
          "clipId":    "65f1a2b3c4d5e6f7a8b9c0d4",
          "title":     "Updated Clip Title",
          "caption":   "A new caption for this clip",
      }
      body, _ := json.Marshal(data)
      req, _ := http.NewRequest("POST", "https://public.reap.video/api/v1/automation/update-clip", bytes.NewBuffer(body))
      req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
      req.Header.Set("Content-Type", "application/json")
      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      respBody, _ := ioutil.ReadAll(resp.Body)
      fmt.Println(string(respBody))
  }
  ```

  ```java Java theme={"system"}
  import java.io.*;
  import java.net.HttpURLConnection;
  import java.net.URL;
  public class UpdateClipExample {
      public static void main(String[] args) throws Exception {
          URL url = new URL("https://public.reap.video/api/v1/automation/update-clip");
          HttpURLConnection conn = (HttpURLConnection) url.openConnection();
          conn.setRequestMethod("POST");
          conn.setRequestProperty("Authorization", "Bearer YOUR_API_KEY");
          conn.setRequestProperty("Content-Type", "application/json");
          conn.setDoOutput(true);
          String jsonBody = "{\"projectId\":\"65f1a2b3c4d5e6f7a8b9c0d2\",\"clipId\":\"65f1a2b3c4d5e6f7a8b9c0d4\",\"title\":\"Updated Clip Title\",\"caption\":\"A new caption for this clip\"}";
          try (OutputStream os = conn.getOutputStream()) {
              os.write(jsonBody.getBytes("utf-8"));
          }
          BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8"));
          StringBuilder response = new StringBuilder();
          String responseLine;
          while ((responseLine = br.readLine()) != null) {
              response.append(responseLine.trim());
          }
          System.out.println(response.toString());
      }
  }
  ```
</CodeGroup>

## Example Response

<CodeGroup>
  <CodeGroup.Tab label="200 OK">
    ```json theme={"system"}
    {
      "id": "65f1a2b3c4d5e6f7a8b9c0d4",
      "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
      "clipUrl": "https://cdn.reap.video/clips/65f1a2b3c4d5e6f7a8b9c0d4.mp4",
      "clipWithCaptionsUrl": "https://cdn.reap.video/clips/65f1a2b3c4d5e6f7a8b9c0d4-captions.mp4",
      "startTime": 45.2,
      "endTime": 75.8,
      "duration": 30.6,
      "topic": "AI Technology",
      "title": "Updated Clip Title",
      "caption": "A new caption for this clip",
      "language": "en",
      "translateTranscription": false,
      "translationLanguages": [],
      "transcriptionScript": "native",
      "viralityScore": 8.7,
      "reframeClips": true,
      "exportResolution": 1080,
      "exportOrientation": "portrait",
      "captionsPreset": "system_beasty",
      "enableCaptions": true,
      "enableEmojis": true,
      "enableHighlights": true,
      "metadata": {
        "duration": 30.6,
        "width": 1080,
        "height": 1920,
        "fps": 30,
        "bitrate": 4000000,
        "size": 25000000,
        "codec": "h264"
      },
      "createdAt": 1710001800,
      "updatedAt": 1710005000
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="400 Bad Request">
    ```json theme={"system"}
    {
      "detail": "Cannot update a clip that is still processing"
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="401 Unauthorized">
    ```json theme={"system"}
    {
      "detail": "Unauthorized - Invalid or missing API key"
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="404 Not Found">
    ```json theme={"system"}
    {
      "detail": "Clip not found"
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="429 Too Many Requests">
    ```json theme={"system"}
    {
      "detail": "Too Many Requests - Rate limit of 10 requests per minute exceeded"
    }
    ```
  </CodeGroup.Tab>
</CodeGroup>


## OpenAPI

````yaml POST /automation/update-clip
openapi: 3.1.0
info:
  title: Reap Automation API
  description: AI-powered video processing automation API
  version: 1.0.0
servers:
  - url: https://public.reap.video/api/v1
security:
  - bearerAuth: []
paths:
  /automation/update-clip:
    post:
      summary: Update Clip
      description: Update the title and caption of a clip
      operationId: updateClip
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateClipRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationClip'
components:
  schemas:
    UpdateClipRequest:
      type: object
      required:
        - projectId
        - clipId
      properties:
        projectId:
          type: string
          description: ID of the parent project
        clipId:
          type: string
          description: ID of the clip to update
        title:
          type: string
          nullable: true
          description: New clip title (max 80 characters)
        caption:
          type: string
          nullable: true
          description: New clip caption (max 250 characters)
    AutomationClip:
      type: object
      properties:
        id:
          type: string
        projectId:
          type: string
        clipUrl:
          type: string
          nullable: true
          description: >-
            Direct download URL for the final clip (includes captions if
            enabled)
        clipWithCaptionsUrl:
          type: string
          nullable: true
          deprecated: true
          description: Deprecated. Use clipUrl instead.
        startTime:
          type: number
        endTime:
          type: number
        duration:
          type: number
        topic:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        caption:
          type: string
          nullable: true
        language:
          type: string
          nullable: true
        translateTranscription:
          type: boolean
        translationLanguages:
          type: array
          items:
            type: string
        transcriptionScript:
          $ref: '#/components/schemas/TranscriptionScript'
        viralityScore:
          type: number
          nullable: true
        reframeClips:
          type: boolean
        exportResolution:
          type: integer
        exportOrientation:
          $ref: '#/components/schemas/VideoOrientation'
        captionsPreset:
          type: string
          nullable: true
        enableCaptions:
          type: boolean
        enableEmojis:
          type: boolean
        enableHighlights:
          type: boolean
        metadata:
          $ref: '#/components/schemas/VideoFileMeta'
        createdAt:
          type: integer
        updatedAt:
          type: integer
    TranscriptionScript:
      type: string
      enum:
        - native
        - roman
      default: native
    VideoOrientation:
      type: string
      enum:
        - landscape
        - portrait
        - square
    VideoFileMeta:
      type: object
      properties:
        width:
          type: integer
        height:
          type: integer
        aspectRatio:
          type: string
        size:
          type: number
        bitrate:
          type: number
        fps:
          type: number
        duration:
          type: number
        rotation:
          type: integer
        resolution:
          type: integer
        codec:
          type: string
        codecFullName:
          type: string
        codecTag:
          type: string
        format:
          type: string
        formatFullName:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````