V100's edit-by-transcript API is built on the word-level transcript. Get the transcript, present it to the user, and send edit operations back to the API.
import { V100 } from 'v100-sdk';
const v100 = new V100('YOUR_API_KEY');
// Get the word-level transcript
const transcript = await v100.transcripts.get('tr_abc123');
// transcript.words = [
// { index: 0, word: "So", start: 1200, end: 1400, speaker: "A" },
// { index: 1, word: "basically", start: 1400, end: 1850, speaker: "A" },
// { index: 2, word: "the", start: 1850, end: 1950, speaker: "A" },
// ...
// ]
// User clicks a word → seek video to that timestamp
const onWordClick = (wordIndex) => {
const word = transcript.words[wordIndex];
videoPlayer.seek(word.start); // Jump to 1200ms
};
// User selects words 0-4 and deletes them → cut video
const edit = await v100.edits.create({
recordingId: 'rec_xyz789',
transcriptId: 'tr_abc123',
operations: [
{ type: 'delete', wordIndices: [0, 1, 2, 3, 4] }
]
});
// edit.version → 1
// edit.segments → [{ start: 3200, end: 62000 }] (kept segments)
// edit.removedMs → 2000 (2 seconds removed)
// Undo the edit
const undone = await v100.edits.undo(edit.id);
// Export as EDL for Premiere Pro
const edl = await v100.edits.exportEdl(edit.id);
// edl.url → "https://api.v100.ai/v1/edits/edit_001/export.edl"
// Render the final edited video
const rendered = await v100.edits.render(edit.id);
// rendered.url → "https://cdn.v100.ai/edited_rec_xyz789.mp4"