POST /api/process
Submits a video (via URL or file upload) for asynchronous processing. The API will:- Download/upload the video
- Transcribe audio with Whisper (word-level timestamps)
- Detect scene boundaries with PySceneDetect
- Use Gemini AI to identify 3-15 viral moments (15-60 seconds each)
- Extract and vertically reframe clips to 9:16 format
- Upload artifacts to S3 (silent background task)
This endpoint returns immediately with a
job_id. Use /api/status/{job_id} to poll for completion.Authentication
Your Google Gemini API key for AI analysis
Request Parameters
JSON Body (for URLs)
YouTube URL or direct video link to process
Form Data (for File Uploads)
Video file to upload (max 2048 MB)
Alternative to file upload - YouTube URL
You must provide either
url or file, not both.Response
Unique identifier for tracking this processing job
Initial status (always “queued” for new jobs)
Processing Flow
Error Codes
| Code | Description |
|---|---|
| 400 | Missing X-Gemini-Key header |
| 400 | Neither url nor file provided |
| 413 | File exceeds 2048 MB limit |
| 500 | Processing error (download failed, API quota exceeded, etc.) |
Examples
Process YouTube Video
Upload Local Video
Python SDK Example
JavaScript/Fetch Example
Next Steps
After submitting a job:- Poll job status to check progress
- Once completed, apply AI effects to clips
- Add subtitles with custom styling
- Translate videos to other languages
- Post to social media
Advanced Configuration
The processing pipeline is controlled server-side via environment variables:MAX_CONCURRENT_JOBS: Limit parallel processing (default: 5)JOB_RETENTION_SECONDS: Auto-cleanup delay (default: 3600)MAX_FILE_SIZE_MB: Upload size limit (default: 2048)