Generate Highlights from Custom Transcript
Video Summary and Transcription
Generate Highlights from Custom Transcript
Generate AI-powered video highlights from an edited or custom transcript
POST
Generate Highlights from Custom Transcript
Documentation Index
Fetch the complete documentation index at: https://docs.pictory.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Generate concise video highlights from your own custom or edited transcript. This endpoint is useful when you have manually edited the transcription output or want to provide your own transcript data directly. The AI analyzes your transcript and identifies the most important segments to create a summary of your desired duration. What you will accomplish:- Generate highlights from manually edited transcripts
- Use custom transcript data that does not come from the transcription API
- Create summaries from transcripts you have corrected or enhanced
- Apply highlights to videos with pre-existing transcript data
You need a valid API key to use this endpoint. Get your API key from the API Access page in your Pictory dashboard.
Request Headers
API key for authentication
Must be set to
application/jsonBody Parameters
Array of sentence-level transcript segments with word-level timing information.Each sentence object must contain:
uid(string, required): Unique identifier for the sentencespeakerId(number, required): Speaker identifier (e.g.,1)words(array, required): Array of word objects
uid(string, required): Unique identifier for the wordword(string, required): The word textstart_time(number, required): Start time in seconds (supports decimals)end_time(number, required): End time in seconds (supports decimals)speakerId(number, required): Speaker identifiersentence_index(number, required): Index of the sentence
Target duration for the video summary in seconds. The AI will select highlights that fit within this duration.Example:
30 for a 30-second summary, 60 for a 1-minute summaryTotal duration of the source video in seconds. This helps the AI understand the full context when generating highlights.Example:
120 for a 2-minute video, 300 for a 5-minute videoWebhook URL where the summary results will be posted when processing completes.Example:
https://your-domain.com/api/webhooks/video-summaryLanguage code for the transcript content.Supported values:
en (English), es (Spanish), fr (French), de (German), it (Italian), pt (Portuguese), and more.Example: en for English, es for SpanishResponse
Indicates whether the request was successfully queued for processing
Contains the job information
Response Examples
Job Status Response (via Get Job API)
While the highlights job is processing:Code Examples
Common Use Cases
1. Generate Highlights from Edited Transcript
After manually correcting or enhancing a transcript:2. Use Custom Transcript from External Source
When you have transcript data from a third-party service:Usage Notes
Async Processing: This endpoint processes highlights asynchronously. You will receive a
jobId immediately, and the actual highlights will be generated in the background.Transcript Format: Ensure your transcript segments are in chronological order with accurate start and end times. The AI uses timing information to create seamless highlight clips.
Best Practices
Transcript Quality
- Accurate Timing: Ensure start and end times are precise for smooth highlight transitions
- Complete Sentences: Structure transcript at natural sentence boundaries for better context
- No Overlaps: Word timings should not overlap
- Chronological Order: Sentences and words must be ordered by time
- Unique IDs: Use unique
uidvalues for all sentences and words
Duration Selection
-
Platform Optimization:
- TikTok/Reels: 15-30 seconds
- Instagram: 30-60 seconds
- YouTube Shorts: 60 seconds
- LinkedIn: 30-90 seconds
-
Content Type:
- Product demos: 60-90 seconds
- Testimonials: 30-45 seconds
- Educational: 45-60 seconds
Webhook Implementation
- Return 200 OK Quickly: Process the webhook payload asynchronously to avoid timeouts
- Implement Retry Logic: Webhooks may be retried if they fail
- Validate Signatures: Implement webhook signature validation for security
- Log All Webhooks: Keep logs for debugging and audit trails
Related Endpoints
- Generate Highlights from Transcription Job — Simpler option if you have not edited the transcript
- Video Transcription API - Generate the initial transcript
- Get Job by ID - Check job status and retrieve results
