Overview
This guide walks you through the complete workflow: upload a video, create a clipping project, and retrieve your AI-generated clips.
Prerequisites
- A Reap account with API access (get started)
- Your API key from the dashboard
- A video file (MP4 or MOV, 2 min - 3 hours)
Basic Workflow
The typical automation workflow follows these steps:
Get Upload URL
Request a secure upload URL for your video file
Upload Video
Upload your video file to the provided URL
Create Project
Create a video processing project (clips, captions, reframe, or dubbing)
Monitor Progress
Check the project status until processing is complete
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",
"enableEmojis": 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/...",
"title": "Engaging Moment 1",
"duration": 30.5,
"viralityScore": 8.7
}
],
"totalClips": 5
}
You did it! Your clips are ready to download from the clipUrl links. Each clip includes captions, reframing, and a virality score.
What’s Next
Integration Patterns
Batch Processing
Process multiple videos in parallel:
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);
}
Need Help?