Overview

This quickstart guide will walk you through creating your first video project using the Reap Automation API. We’ll cover the basic workflow from uploading a video to generating clips.

Prerequisites

Before you begin, make sure you have:

  • A Reap account with an active subscription
  • An API key (see Authentication)
  • A video file to process (MP4 or MOV format)

Basic Workflow

The typical automation workflow follows these steps:

1

Get Upload URL

Request a secure upload URL for your video file

2

Upload Video

Upload your video file to the provided URL

3

Create Project

Create a video processing project (clips, reframe, or dubbing)

4

Monitor Progress

Check the project status until processing is complete

5

Retrieve Results

Get your processed clips and their URLs

Step-by-Step Example

Let’s create a clipping project that generates short clips from a long video.

1. Get Upload URL

First, request a secure upload URL for your video:

curl -X POST "https://public.reap.video/api/v1/automation/get-upload-url" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "my-video.mp4"
  }'

Response:

{
  "uploadUrl": "https://upload.reap.video/...",
  "id": "65f1a2b3c4d5e6f7a8b9c0d1",
  "fileName": "my-video.mp4",
  "fileType": "video",
  "status": "upload"
}

2. Upload Your Video

Upload your video file to the provided uploadUrl using a PUT request:

curl -X PUT "UPLOAD_URL_FROM_STEP_1" \
  -H "Content-Type: video/mp4" \
  --data-binary @/path/to/your/video.mp4

3. Create a Clipping Project

Now create a clipping project using the upload ID:

curl -X POST "https://public.reap.video/api/v1/automation/create-clips" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "uploadId": "65f1a2b3c4d5e6f7a8b9c0d1",
    "genre": "talking",
    "exportResolution": 1080,
    "exportOrientation": "portrait",
    "reframeClips": true,
    "captionsPreset": "system_beasty",
    "enableEmojies": true,
    "enableHighlights": true,
    "language": "en"
  }'

Response:

{
  "id": "65f1a2b3c4d5e6f7a8b9c0d2",
  "title": "my-video.mp4",
  "status": "processing",
  "projectType": "clipping",
  "billedDuration": 300.5,
  "createdAt": 1710345600
}

4. Monitor Project Status

Check the project status periodically:

curl -X GET "https://public.reap.video/api/v1/automation/get-project-status?projectId=65f1a2b3c4d5e6f7a8b9c0d2" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

{
  "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
  "projectType": "clipping",
  "source": "user_upload",
  "status": "completed"
}

5. Get Your Clips

Once processing is complete, retrieve the generated clips:

curl -X GET "https://public.reap.video/api/v1/automation/get-project-clips?projectId=65f1a2b3c4d5e6f7a8b9c0d2" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

{
  "clips": [
    {
      "id": "65f1a2b3c4d5e6f7a8b9c0d3",
      "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
      "clipUrl": "https://cdn.reap.video/clips/...",
      "clipWithCaptionsUrl": "https://cdn.reap.video/clips/with-captions/...",
      "title": "Engaging Moment 1",
      "duration": 30.5,
      "viralityScore": 8.7
    }
  ],
  "totalClips": 5
}

Next Steps

Common Patterns

Batch Processing

Process multiple videos by creating separate upload URLs and projects for each file:

const files = ['video1.mp4', 'video2.mp4', 'video3.mp4'];

for (const file of files) {
  // Get upload URL
  const uploadResponse = await fetch('/automation/get-upload-url', {
    method: 'POST',
    headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
    body: JSON.stringify({ filename: file })
  });
  
  // Upload and create project...
}

Webhook Integration

Set up webhooks to get notified when projects complete instead of polling the status endpoint.

Error Handling

Always implement proper error handling for API requests:

try {
  const response = await fetch('/automation/create-clips', {
    method: 'POST',
    headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
    body: JSON.stringify(projectData)
  });
  
  if (!response.ok) {
    throw new Error(`API error: ${response.status}`);
  }
  
  const project = await response.json();
  console.log('Project created:', project.id);
} catch (error) {
  console.error('Failed to create project:', error.message);
}

Support

Need help? Check out these resources: