Generate YouTube Shorts
POST /api/v1/videos/youtube-shorts
Start the YouTube → Shorts pipeline. pepe.business downloads the source video (via yt-dlp), transcribes it, finds the most engaging moments using an LLM, face-tracks the speaker with OpenCV (Haar cascade), and renders 9:16 MP4 clips ready for TikTok, Instagram Reels, Facebook Reels, and YouTube Shorts.
The pipeline runs asynchronously. The initial response returns a VideoJob row in queued status. Poll via GET /v1/videos/youtube-shorts/{id} or subscribe to the video.render.complete webhook.
⚠️ Legal attestation required. You must set
rightsAttestation: trueon every request, attesting under penalty of perjury that you either own the source video or have a valid license (e.g. the creator's permission, Creative Commons, fair use with commentary). pepe.business logs the attestation with your user ID and IP.
Request body
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"sportsMode": false,
"captionLanguage": "en",
"targetClipCount": 3,
"targetDurationSec": 45,
"rightsAttestation": true
}
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | YouTube video URL (watch?v=, youtu.be/, or Shorts URL) |
sportsMode | boolean | no | Optimizes face tracking for fast-moving subjects (sports, fitness, dance). Default false. |
captionLanguage | string | no | BCP-47 code for burned-in captions (default: en, 30+ supported) |
targetClipCount | number | no | Number of clips to extract (default 3, max 10) |
targetDurationSec | number | no | Target duration per clip in seconds (default 45, range 15-90) |
rightsAttestation | boolean | yes | Perjury attestation that you have the rights to clip this video |
Response
{
"id": "vjob_xxx",
"status": "queued",
"sourceUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"targetClipCount": 3,
"targetDurationSec": 45,
"clips": [],
"createdAt": "2026-08-11T10:00:00Z"
}
The status field transitions: queued → transcribing → analyzing → rendering → completed (or failed).
Example
curl -X POST https://pepe.business/api/v1/videos/youtube-shorts \
-H "Authorization: Bearer pk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"targetClipCount": 3,
"targetDurationSec": 45,
"rightsAttestation": true
}'
Legal notes
- False attestation may result in account suspension and DMCA liability under 17 U.S.C. § 503
- Clip Rewards publishers who file false attestations forfeit pending balance
- See Clip Rewards Takedown for the counter-notice flow