๐ŸŽฌ Peakcut API

AI Video Clipping via REST API

Programmatically turn long videos into short, captioned clips.

Getting Started

The Peakcut API lets you process videos and fetch clips programmatically. All requests must include a valid API key in the Authorization header:

Authorization: Bearer pk_your_api_key_here

Generate your first API key: Sign in to Peakcut and go to API settings (link in your account menu).

Pricing: Free ($0/mo, 100 calls/month), Pro ($15/mo, 500 calls/month), or Pro Plus ($29/mo, 2000 calls/month).

Endpoints

POST /api/v1/process

Submit a video for processing.

Request

file
multipart/form-data (required)

Video file (MP4, MOV, WEBM, MKV). Max size: 300MB.

clip_format
string (optional, default: "vertical")

Output format: vertical (9:16), square (1:1), or horizontal (16:9).

Response (200)

{
  "job_id": "abc12345",
  "status": "queued"
}

Use the job_id to poll for results with GET /api/v1/clips/{job_id}.

GET /api/v1/clips/{job_id}

Get clip results from a completed job.

Request

job_id
path parameter (required)

The job ID returned from /api/v1/process.

Response (200, processing)

{
  "status": "processing",
  "elapsed_seconds": 45
}

Response (200, done)

{
  "status": "done",
  "clips": [
    {
      "rank": 1,
      "text": "This is the best moment from your video",
      "virality_score": 87,
      "download_url": "https://cutpeak.duckdns.org/jobs/abc12345/peakcut_rank1_v87_vertical.mp4"
    }
  ]
}

Example: cURL

# Submit a video
curl -X POST https://cutpeak.duckdns.org/api/v1/process \
  -H "Authorization: Bearer pk_your_api_key_here" \
  -F "file=@video.mp4" \
  -F "clip_format=vertical"

# Response: {"job_id": "abc12345", "status": "queued"}

# Poll for results (repeat until status is "done")
curl https://cutpeak.duckdns.org/api/v1/clips/abc12345 \
  -H "Authorization: Bearer pk_your_api_key_here"
      

Example: Python

import requests
import time

API_KEY = "pk_your_api_key_here"
BASE_URL = "https://cutpeak.duckdns.org"

# Submit video
with open("video.mp4", "rb") as f:
    resp = requests.post(
        f"{BASE_URL}/api/v1/process",
        headers={"Authorization": f"Bearer {API_KEY}"},
        files={"file": f},
        data={"clip_format": "vertical"}
    )
    job_id = resp.json()["job_id"]

# Poll for results
while True:
    resp = requests.get(
        f"{BASE_URL}/api/v1/clips/{job_id}",
        headers={"Authorization": f"Bearer {API_KEY}"}
    )
    result = resp.json()
    if result["status"] == "done":
        for clip in result["clips"]:
            print(f"Clip #{clip['rank']}: {clip['text']}")
            print(f"Download: {clip['download_url']}")
        break
    elif result["status"] == "error":
        print(f"Error: {result['error']}")
        break
    time.sleep(5)  # Poll every 5 seconds
      

API Limits & Pricing

Tier Monthly Cost Monthly Calls Best For
Free $0 100 calls Testing and low-volume integrations
Pro $15 500 calls Small teams and content creators
Pro Plus $29 2000 calls Agencies, platforms, and high-volume users

Need more? Contact support@peakcut.example for custom plans.

Error Handling

401 Unauthorized: Invalid or missing API key. Check your Authorization header.

429 Too Many Requests: You've exceeded your monthly API call limit for your tier.

413 Payload Too Large: Video file exceeds 300MB. Try a shorter clip.

400 Bad Request: Invalid parameters (e.g., unsupported clip_format).

503 Service Unavailable: Server queue is full. Wait a few moments and retry.

FAQ

Can I process multiple videos in parallel? Yes, submit them sequentially and poll all job IDs. We process one at a time internally, so jobs will queue.

How long does processing take? Typically 1-3 minutes depending on video length and server load.

Are API calls refundable? No, since videos are processed immediately. Plan your monthly usage carefully or contact support.

Can I upgrade my API key? Yes, create a new key on your account page โ€” it will have your current subscription tier.