Library playground
Everything below runs @vid2context/core, the library behind the CLI, the MCP server and the HTTP API, in your browser. Pick a context, change an option and the output follows. The box under each operation shows the exact code it ran; Edit as code copies it into the code box, where you can change anything.
return core.render(context, 'srt');
1
00:00:01,200 --> 00:00:03,360
All right, so here we are,
in front of the elephants
2
00:00:05,318 --> 00:00:07,974
the cool thing about these guys
is that they have really...
3
00:00:07,974 --> 00:00:12,616
really really long trunks
4
00:00:12,616 --> 00:00:14,367
and that's cool
5
00:00:14,421 --> 00:00:15,733
(baaaaaaaaaaahhh!!)
6
00:00:16,881 --> 00:00:18,881
and that's pretty much all there is to say
In scope: core (all of @vid2context/core), context (the context above, before section and cleanup) and secondary (the second transcript, or undefined). Return a value; console.log works too. Runs in a Web Worker, stopped after 5 seconds.
What you can change
- Context: one of the real fixtures from the repo, a
VideoContextyou paste (the body ofGET /api/v1/context), or one fetched live from this site's API or your own server. - Section and cleanup:
getSectioncuts a time range or a chapter;cleanTranscriptremoves sound tags, rebuilds sentences and drops fillers. Both return new objects, so the raw transcript is never changed. - Operation:
renderwith each format's own options,chunkTranscript,transcriptOutline,estimateTokensacross every format,agentPromptand the cleanup report. - Your code: an async function body with
core,contextandsecondaryin scope. It runs in a Web Worker with no access to this page.
The address bar keeps every choice and your code, so a copied link opens the same run. Pasted JSON stays on your machine and is never put in a link.
Token counts come from estimateTokens, a fast estimate made for budgets, not billing. Read a long video by chapter does the same with outlines and sections through the API.