Tutorials

Tutorials

Each tutorial is a short path through the HTTP API, one request at a time. Every request is a runnable block: edit the fields, press Run, and the response appears under it. Before you run anything, each block shows a real response recorded from a vid2context server, so you can read a tutorial end to end without running it.

The tutorials

  • Your first transcript: Get a video's transcript from the vid2context HTTP API in five runnable requests: plain text, timestamps, captions files, the full JSON context and how it was made.
  • Read a long video by chapter: Read long videos without sending the whole transcript to a model: an outline with token counts, then one chapter or time range, or a context pack sized to a token budget.
  • Many videos at once: Expand a playlist, put several videos into one context pack, download every format as a zip, and find where a topic comes up across videos, all as runnable requests.
  • Build a research collection: Group videos into a named vid2context collection, read it back, turn it into one context pack, export Obsidian notes and share the definition, all as runnable requests that chain into each other.
  • Cited answers and briefs: Ask questions about videos and get answers whose citations are checked against the transcript, stream them, build a cited brief as a background job, and extract structured data.
  • Your own audio and video files: Upload an audio or video file to the vid2context HTTP API and get its transcript in any format, or import a transcript you already have, with a public-domain Apollo 11 clip you can send from the page.
  • Call the API from your code: Use the vid2context HTTP API from JavaScript or Python the robust way: the error shape and codes, retries with Retry-After, API keys, ETag caching, jobs and timeouts.

How the Run button works

Every block calls the HTTP API directly from your browser. Pick where with the Server menu on any block (the choice applies to all of them and is remembered):

  • This site: the API on the same host as these docs. On a deployment that serves both (the Cloudflare Worker in this repo does), this needs no setup.

  • Local server: http://127.0.0.1:8787, a server you start from a clone of the repo. Start it so that this page may read its responses:

    sh
    git clone https://github.com/nirholas/vid2context.git
    cd vid2context
    npm install
    VID2CONTEXT_CORS_ORIGINS=https://vid2context.com npm run start:server

    Use this page's own address in VID2CONTEXT_CORS_ORIGINS if you read the docs somewhere else. Your browser may ask whether the site may reach devices on your local network; allow it.

  • Custom URL: any other vid2context server. The gear button next to the menu sets the URL and an optional API key for servers that require one. The key stays in this browser tab and never appears in the snippets, which read $VID2CONTEXT_API_KEY instead.

Each block also shows the same request as curl, JavaScript, Python and, where one exists, the CLI command and the MCP tool call. The snippets follow your edits and the server you picked, so you can copy a request you have just tried.

Share copies a link to the block with your edits in it: whoever opens it sees the same fields, ready to run. Reset puts the fields back to the example's defaults. Press Ctrl+Enter (or Cmd+Enter) in any field to run the block without reaching for the button.

Before you start

No account and no key are needed. Captions come straight from the platform; when a video has none, speech-to-text runs on free and keyless Whisper rungs, and answers and briefs run on the free LLM chain. Keys you add to a server only add more rungs, tried before the keyless ones. The Examples section has every request on its own, grouped by what it does.

More to try

  • Library playground: run the vid2context library in your browser on real contexts, with live formats, chunking and a code box.
  • Embed vid2context: put a searchable transcript, chapters, a quote or a video card on any page, and build the embed live in the page.