Define your entire video processing workflow in a single API call. This example transcribes a video, detects and removes silence, adds captions, and publishes the result.
// npm install v100-sdk
import { V100 } from 'v100-sdk';
const v100 = new V100('YOUR_API_KEY');
// Define and execute a video processing pipeline
const pipeline = await v100.pipelines.run({
name: 'podcast-cleanup',
input: { videoUrl: 'https://storage.yourco.com/raw/episode-42.mp4' },
webhook: 'https://yourco.com/webhooks/pipeline-complete',
steps: [
// Step 1: Transcribe and detect silence in parallel
{
parallel: [
{
id: 'transcribe',
action: 'transcribe',
config: { language: 'auto', diarize: true }
},
{
id: 'silence',
action: 'detect_silence',
config: { thresholdDb: -40, minDurationMs: 1500 }
}
]
},
// Step 2: Remove silence (only if >10% of video is silent)
{
id: 'remove',
action: 'remove_silence',
condition: 'steps.silence.silenceRatio > 0.10',
config: {
segments: '$steps.silence.segments', // Reference prior output
paddingMs: 200
}
},
// Step 3: Add captions from transcription
{
id: 'captions',
action: 'add_captions',
config: {
transcript: '$steps.transcribe.transcript',
format: 'burned-in',
style: { font: 'Inter', size: 24, color: '#FFFFFF' }
}
},
// Step 4: Publish to CDN
{
id: 'publish',
action: 'publish',
config: {
destination: 'cdn',
filename: 'episode-42-final.mp4',
signedUrl: true,
expiresIn: '7d'
}
}
]
});
// pipeline.id → "pipe_abc123"
// pipeline.status → "running"
// Pipeline completion delivered via webhook