Generate YouTube Shorts

Start the YouTube → Shorts pipeline: paste a URL, AI finds viral moments and cuts 9:16 clips.

Edit this page·Last updated: July 13, 2026

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: true on 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
}
FieldTypeRequiredDescription
urlstringyesYouTube video URL (watch?v=, youtu.be/, or Shorts URL)
sportsModebooleannoOptimizes face tracking for fast-moving subjects (sports, fitness, dance). Default false.
captionLanguagestringnoBCP-47 code for burned-in captions (default: en, 30+ supported)
targetClipCountnumbernoNumber of clips to extract (default 3, max 10)
targetDurationSecnumbernoTarget duration per clip in seconds (default 45, range 15-90)
rightsAttestationbooleanyesPerjury 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
  }'
  • 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

Was this page helpful?