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

# Create Reframe

> Automatically reframe videos for different aspect ratios

> **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

Automatically reframe videos from landscape to portrait or square formats using AI. Perfect for adapting content for TikTok, Instagram Stories, and other vertical video platforms.

## Rate Limiting

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

## Video Requirements

<CardGroup cols={2}>
  <Card title="Duration" icon="clock">
    **Minimum:** 3 seconds\
    **Maximum:** 15 minutes
  </Card>

  <Card title="File Size" icon="scale">
    **Maximum:** 5 GB
  </Card>

  <Card title="Format" icon="file-video">
    MP4 or MOV with valid video streams
  </Card>

  <Card title="Source Format" icon="expand">
    Works best with landscape (16:9) source videos
  </Card>
</CardGroup>

## Plan Limits

<Warning>
  Reframe is only available on **Studio** plans. Creator and Free plans cannot use this endpoint.
</Warning>

| Plan   | Concurrent Projects |
| ------ | ------------------- |
| Studio | 10                  |

<Note>
  The Automation API requires an active Studio subscription. [View pricing](https://reap.video/pricing) to compare plans.
</Note>

## Response

<ResponseField name="id" type="string">
  Unique project identifier
</ResponseField>

<ResponseField name="title" type="string">
  Project title (usually the filename)
</ResponseField>

<ResponseField name="thumbnail" type="string">
  Thumbnail URL for the project
</ResponseField>

<ResponseField name="billedDuration" type="number">
  Duration in seconds that will be billed to your account
</ResponseField>

<ResponseField name="status" type="string">
  Current processing status

  * `processing` - Video is being analyzed and reframed
  * `completed` - Reframing completed successfully
  * `failed` - Processing failed due to an error
</ResponseField>

<ResponseField name="projectType" type="string">
  Type of project (always "reframe" for this endpoint)
</ResponseField>

<ResponseField name="source" type="string">
  Source of the video content (always "Upload" for this endpoint)
</ResponseField>

<ResponseField name="genre" type="string">
  Video genre used for AI analysis
</ResponseField>

<ResponseField name="topics" type="array">
  Array of identified topics in the video
</ResponseField>

<ResponseField name="clipDurations" type="array">
  Array of clip duration preferences
</ResponseField>

<ResponseField name="selectedStart" type="number">
  Start time in seconds for processing (null if entire video)
</ResponseField>

<ResponseField name="selectedEnd" type="number">
  End time in seconds for processing (null if entire video)
</ResponseField>

<ResponseField name="reframeClips" type="boolean">
  Whether clips are automatically reframed (always true for reframe projects)
</ResponseField>

<ResponseField name="exportResolution" type="integer">
  Output resolution for the reframed video
</ResponseField>

<ResponseField name="exportOrientation" type="string">
  Output orientation for the reframed video
</ResponseField>

<ResponseField name="captionsPreset" type="string">
  Caption style preset ID (null if captions disabled)
</ResponseField>

<ResponseField name="enableCaptions" type="boolean">
  Whether captions are enabled
</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="language" type="string">
  Primary language of the video content
</ResponseField>

<ResponseField name="dubbingLanguage" type="string">
  Target dubbing language (null if not applicable)
</ResponseField>

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

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

<ResponseField name="metadata" type="object">
  Video file metadata including duration, resolution, format, etc.
</ResponseField>

<ResponseField name="urls" type="object">
  Project URLs and assets (populated when processing completes)
</ResponseField>

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

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

## Example Request

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -X POST "https://public.reap.video/api/v1/automation/create-reframe" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "uploadId": "65f1a2b3c4d5e6f7a8b9c0d1",
      "genre": "talking",
      "orientation": "portrait",
      "disableAutoSplit": false
    }'
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch('https://public.reap.video/api/v1/automation/create-reframe', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      uploadId: '65f1a2b3c4d5e6f7a8b9c0d1',
      genre: 'talking',
      orientation: 'portrait',
      disableAutoSplit: false
    })
  });

  const project = await response.json();
  console.log('Reframe project created:', project.id);
  ```

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

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

  data = {
      'uploadId': '65f1a2b3c4d5e6f7a8b9c0d1',
      'genre': 'talking',
      'orientation': 'square',
      'disableAutoSplit': False
  }

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

  project = response.json()
  print(f'Reframe project created: {project["id"]}')
  ```

  ```php PHP theme={"system"}
  <?php
  $data = [
      'uploadId' => '65f1a2b3c4d5e6f7a8b9c0d1',
      'genre' => 'talking',
      'orientation' => 'portrait',
      'disableAutoSplit' => false
  ];

  $ch = curl_init('https://public.reap.video/api/v1/automation/create-reframe');
  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);
  $project = json_decode($response, true);
  echo 'Reframe project created: ' . $project['id'] . "\n";
  ?>
  ```

  ```go Go theme={"system"}
  package main
  import (
      "bytes"
      "encoding/json"
      "fmt"
      "io/ioutil"
      "net/http"
  )
  func main() {
      url := "https://public.reap.video/api/v1/automation/create-reframe"
      data := map[string]interface{}{
          "uploadId": "65f1a2b3c4d5e6f7a8b9c0d1",
          "genre": "talking",
          "orientation": "portrait",
          "disableAutoSplit": false,
      }
      payload, _ := json.Marshal(data)
      req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
      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()
      body, _ := ioutil.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```

  ```java Java theme={"system"}
  import java.io.*;
  import java.net.HttpURLConnection;
  import java.net.URL;
  public class CreateReframeExample {
      public static void main(String[] args) throws Exception {
          URL url = new URL("https://public.reap.video/api/v1/automation/create-reframe");
          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 jsonInputString = "{\"uploadId\":\"65f1a2b3c4d5e6f7a8b9c0d1\",\"genre\":\"talking\",\"orientation\":\"portrait\",\"disableAutoSplit\":false}";
          try (OutputStream os = conn.getOutputStream()) {
              os.write(jsonInputString.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("Reframe project created: " + response.toString());
      }
  }
  ```
</CodeGroup>

## Example Response

<CodeGroup>
  <CodeGroup.Tab label="200 OK">
    ```json theme={"system"}
    {
      "id": "65f1a2b3c4d5e6f7a8b9c0d6",
      "title": "Landscape Video Reframe",
      "thumbnail": "https://cdn.reap.video/thumbnails/65f1a2b3c4d5e6f7a8b9c0d6.jpg",
      "billedDuration": 600.0,
      "status": "processing",
      "projectType": "reframe",
      "source": "Upload",
      "genre": "talking",
      "topics": [],
      "clipDurations": [],
      "selectedStart": 0,
      "selectedEnd": null,
      "reframeClips": true,
      "exportResolution": 1080,
      "exportOrientation": "portrait",
      "captionsPreset": null,
      "enableCaptions": false,
      "enableEmojis": false,
      "enableHighlights": false,
      "language": "en",
      "dubbingLanguage": null,
      "translateTranscription": false,
      "translationLanguages": [],
      "transcriptionScript": "native",
      "metadata": {
        "duration": 600.0,
        "width": 1920,
        "height": 1080,
        "fps": 30,
        "bitrate": 4000000,
        "size": 120000000,
        "codec": "h264"
      },
      "urls": {},
      "createdAt": 1710003000,
      "updatedAt": 1710003000
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="400 Bad Request">
    ```json theme={"system"}
    {
      "detail": "Missing required parameter: uploadId"
    }
    ```
  </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": "Upload not found"
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="422 Unprocessable Entity">
    ```json theme={"system"}
    {
      "detail": "Invalid video format or duration. Video must be between 3 seconds and 15 minutes."
    }
    ```
  </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.Tab label="429 Concurrent Project Limit">
    ```json theme={"system"}
    {
      "detail": "Maximum concurrent projects reached. Please wait for the current projects to complete."
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="500 Internal Server Error">
    ```json theme={"system"}
    {
      "detail": "Internal Server Error - Something went wrong on our end"
    }
    ```
  </CodeGroup.Tab>
</CodeGroup>

## Processing Workflow

1. **Upload Analysis** - Video is analyzed for speakers, objects, and key visual elements
2. **Smart Cropping** - AI automatically crops and reframes to keep important content in view
3. **Motion Tracking** - Follows speakers and maintains optimal framing throughout the video
4. **Segmentation** - Optionally splits longer videos into optimal segments (unless disabled)
5. **Output Generation** - Creates reframed video in the target aspect ratio

## Reframing Features

* **Speaker Tracking**: Automatically follows speakers and keeps them centered
* **Object Recognition**: Identifies and tracks important visual elements
* **Smart Cropping**: Maintains optimal composition throughout the video
* **Smooth Transitions**: Ensures natural camera movements between focus points
* **Auto-Segmentation**: Intelligently splits content into engaging segments

## Use Cases

<CardGroup cols={2}>
  <Card title="Multi-Platform Distribution" icon="share-2">
    Automatically adapt content for YouTube, TikTok, Instagram, and more
  </Card>

  <Card title="Content Management Systems" icon="database">
    Generate all aspect ratio variants on upload for any platform
  </Card>

  <Card title="Video Hosting Platforms" icon="cloud">
    Offer automatic reframing as a feature to your users
  </Card>

  <Card title="Marketing Automation" icon="zap">
    Scale ad creative production across different placements
  </Card>
</CardGroup>

## Best Practices

* **Source Quality**: Use high-resolution landscape videos for best results
* **Speaker Positioning**: Videos with centered speakers reframe more effectively
* **Content Type**: Works best with talking head videos and presentations
* **Duration**: Shorter videos (under 5 minutes) process faster and more accurately


## OpenAPI

````yaml POST /automation/create-reframe
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/create-reframe:
    post:
      summary: Create Reframe
      description: Automatically reframe videos for different aspect ratios
      operationId: createReframe
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReframeRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationProject'
components:
  schemas:
    CreateReframeRequest:
      type: object
      required:
        - uploadId
      properties:
        uploadId:
          type: string
          description: Upload ID from a previously uploaded file
        genre:
          type: string
          enum:
            - talking
            - screenshare
            - gaming
          default: talking
          description: Video genre for better AI analysis
        orientation:
          type: string
          enum:
            - portrait
            - square
          default: portrait
          description: Target orientation
        disableAutoSplit:
          type: boolean
          default: false
          description: Whether to disable automatic splitting into segments
    AutomationProject:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        thumbnail:
          type: string
        billedDuration:
          type: number
        status:
          type: string
          enum:
            - queued
            - prepped
            - draft
            - processing
            - finalizing
            - completed
            - invalid
            - expired
            - failed
            - error
        projectType:
          type: string
          enum:
            - clipping
            - captions
            - reframe
            - dubbing
            - transcription
        source:
          type: string
          enum:
            - Upload
            - Youtube
            - Vimeo
            - TwitchVod
            - Twitter
            - RumbleEmbed
            - Generic
        genre:
          $ref: '#/components/schemas/VideoGenre'
        topics:
          type: array
          items:
            type: string
        clipDurations:
          type: array
          items:
            type: array
            items:
              type: integer
        selectedStart:
          type: number
          nullable: true
        selectedEnd:
          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
        language:
          type: string
          nullable: true
        dubbingLanguage:
          type: string
          nullable: true
        translateTranscription:
          type: boolean
        translationLanguages:
          type: array
          items:
            type: string
        transcriptionScript:
          $ref: '#/components/schemas/TranscriptionScript'
        metadata:
          $ref: '#/components/schemas/VideoFileMeta'
        urls:
          type: object
        createdAt:
          type: integer
        updatedAt:
          type: integer
    VideoGenre:
      type: string
      enum:
        - talking
        - screenshare
        - gaming
      default: talking
    VideoOrientation:
      type: string
      enum:
        - landscape
        - portrait
        - square
    TranscriptionScript:
      type: string
      enum:
        - native
        - roman
      default: native
    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

````