Examples

Collections and library

Every video a request reads is saved in the server's library. Collections are named groups of saved videos that one id stands for. The blocks on this page chain: run Create a collection and its id fills in the blocks after it. The CLI equivalents are npx -y vid2context collection ... and npx -y vid2context library ..., and agents use the MCP tools create_collection, add_to_collection and get_collection.

Create a collection

POST/api/v1/collectionsCreate a collection

The id is the name as a slug plus a random suffix. The blocks below use it once you run this one.

Playlists, channels or feeds. A refresh adds their new videos.
bash
curl https://vid2context.com/api/v1/collections \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "G-Wagon research",
  "description": "Buyer videos to compare model years"
}'
Recorded response: 201 Created, 11 ms, 2026-11-15
content-type application/jsonx-ratelimit-remaining 59
{
  "id": "g-wagon-research-2c2983f1",
  "name": "G-Wagon research",
  "description": "Buyer videos to compare model years",
  "sources": [],
  "videoIds": [],
  "createdAt": "2026-11-15T15:29:16.875Z",
  "updatedAt": "2026-11-15T15:29:16.875Z"
}

Add videos

POST/api/v1/collections/{id}/itemsAdd videos to the collection

Each video is read once and saved in the library. With a jobs queue this answers 202 and a Job; the runner polls it.

Filled in when you run "Create a collection" above.
bash
curl https://vid2context.com/api/v1/collections/g-wagon-research-2c2983f1/items \
  -H 'Content-Type: application/json' \
  -d '{
  "inputs": [
    "https://www.youtube.com/watch?v=cCPsdFdlshc",
    "https://www.youtube.com/watch?v=PzJL3aBRas8"
  ]
}'
Recorded response: 202 Accepted, then the job succeeded after 1.5 s, 2026-11-15
content-type application/jsonx-ratelimit-remaining 58
{
  "id": "job_cGwJKXxEL5ySzsETnHWCFg",
  "kind": "ingest",
  "status": "succeeded",
  "createdAt": "2026-11-15T15:29:16.882Z",
  "updatedAt": "2026-11-15T15:29:16.891Z",
  "progress": {
    "done": 2,
    "total": 2,
    "message": "Added Why I'm Selling My DREAM G-Wagon (Custom Build 2015 Mercedes G550)"
  },
  "result": {
    "collection": {
      "id": "g-wagon-research-2c2983f1",
      "name": "G-Wagon research",
      "description": "Buyer videos to compare model years",
      "sources": [],
      "videoIds": [
        "youtube:cCPsdFdlshc",
        "youtube:PzJL3aBRas8"
      ],
      "createdAt": "2026-11-15T15:29:16.875Z",
      "updatedAt": "2026-11-15T15:29:16.890Z"
    },
    "summary": {
      "collectionId": "g-wagon-research-2c2983f1",
      "added": [
        {
          "id": "youtube:cCPsdFdlshc",
          "ref": {
            "input": "https://www.youtube.com/watch?v=cCPsdFdlshc",
            "platform": "youtube",
            "kind": "video",
            "id": "youtube:cCPsdFdlshc",
            "nativeId": "cCPsdFdlshc",
            "url": "https://www.youtube.com/watch?v=cCPsdFdlshc"
          },
          "title": "Best & Worst G-Wagon Years: Reliability, Interiors & Engines Ranked!",
          "channel": "Alliance Motorworks",
          "durationSec": 1084,
          "origin": "stt",
          "language": "en",
          "savedAt": "2026-11-14T17:39:41.214Z"
        },
        {
          "id": "youtube:PzJL3aBRas8",
          "ref": {
            "input": "https://www.youtube.com/watch?v=PzJL3aBRas8",
            "platform": "youtube",
            "kind": "video",
            "id": "youtube:PzJL3aBRas8",
            "nativeId": "PzJL3aBRas8",
            "url": "https://www.youtube.com/watch?v=PzJL3aBRas8"
          },
          "title": "Why I'm Selling My DREAM G-Wagon (Custom Build 2015 Mercedes G550)",
          "channel": "Alliance Motorworks",
          "durationSec": 697,
          "origin": "stt",
          "language": "en",
          "savedAt": "2026-11-14T17:37:21.797Z"
        }
      ],
      "skipped": 0,
      "failed": [],
      "remaining": 0,
      "checkedAt": "2026-11-15T15:29:16.891Z"
    }
  }
}

Read a collection

GET/api/v1/collections/{id}Read the collection

Its videos (title, channel, duration, how the transcript was made), videos still pending, and the refresh schedule.

Filled in when you run "Create a collection" above.
bash
curl https://vid2context.com/api/v1/collections/g-wagon-research-2c2983f1
Recorded response: 200 OK, 4 ms, 2026-11-15
content-type application/jsonx-ratelimit-remaining 58
{
  "id": "g-wagon-research-2c2983f1",
  "name": "G-Wagon research",
  "description": "Buyer videos to compare model years",
  "sources": [],
  "videoIds": [
    "youtube:cCPsdFdlshc",
    "youtube:PzJL3aBRas8"
  ],
  "createdAt": "2026-11-15T15:29:16.875Z",
  "updatedAt": "2026-11-15T15:29:16.890Z",
  "videos": [
    {
      "id": "youtube:cCPsdFdlshc",
      "ref": {
        "input": "https://www.youtube.com/watch?v=cCPsdFdlshc",
        "platform": "youtube",
        "kind": "video",
        "id": "youtube:cCPsdFdlshc",
        "nativeId": "cCPsdFdlshc",
        "url": "https://www.youtube.com/watch?v=cCPsdFdlshc"
      },
      "title": "Best & Worst G-Wagon Years: Reliability, Interiors & Engines Ranked!",
      "channel": "Alliance Motorworks",
      "durationSec": 1084,
      "origin": "stt",
      "language": "en",
      "savedAt": "2026-11-14T17:39:41.214Z"
    },
    {
      "id": "youtube:PzJL3aBRas8",
      "ref": {
        "input": "https://www.youtube.com/watch?v=PzJL3aBRas8",
        "platform": "youtube",
        "kind": "video",
        "id": "youtube:PzJL3aBRas8",
        "nativeId": "PzJL3aBRas8",
        "url": "https://www.youtube.com/watch?v=PzJL3aBRas8"
      },
      "title": "Why I'm Selling My DREAM G-Wagon (Custom Build 2015 Mercedes G550)",
      "channel": "Alliance Motorworks",
      "durationSec": 697,
      "origin": "stt",
      "language": "en",
      "savedAt": "2026-11-14T17:37:21.797Z"
    }
  ],
  "pending": [],
  "watch": null
}

Pack a collection

POST/api/v1/packOne context pack for the collection

The same pack as for a list of inputs, built from every video in the collection.

Filled in when you run "Create a collection" above.
bash
curl https://vid2context.com/api/v1/pack \
  -H 'Content-Type: application/json' \
  -d '{
  "collectionId": "g-wagon-research-2c2983f1",
  "maxTokens": 2500
}'
Recorded response: 200 OK, 30 ms, 2026-11-15
content-type text/markdown; charset=utf-8x-ratelimit-remaining 57
# Video context pack

This document holds the transcripts and metadata of 2 videos (29:41 in total), prepared by vid2context for an AI model to read. Each transcript paragraph starts with the time it begins in the video, in brackets; linked times open the video at that moment.

Citation rule: when you use something from a video, cite it as [Title @ m:ss](link), using the time and link of the paragraph you drew on (or [Title @ m:ss] when the video has no link).

Some content was left out to fit a budget of 2500 tokens. Each cut is marked where it happened.

## Contents

1. [Best & Worst G-Wagon Years: Reliability, Interiors & Engines Ranked!](#video-1-best--worst-g-wagon-years-reliability-interiors--engines-ranked) (18:04)
2. [Why I'm Selling My DREAM G-Wagon (Custom Build 2015 Mercedes G550)](#video-2-why-im-selling-my-dream-g-wagon-custom-build-2015-mercedes-g550) (11:37)

## Video 1: Best & Worst G-Wagon Years: Reliability, Interiors & Engines Ranked!

- Channel: [Alliance Motorworks](https://www.youtube.com/channel/UCdEjP_BjQ5audhxLKKzZl2A)
- Published: 2025-03-09
- Duration: 18:04
- Source: https://www.youtube.com/watch?v=cCPsdFdlshc
- Language: en
- Transcript: speech-to-text by stt/cloudflare/@cf/openai/whisper-large-v3-turbo

### Description

> Watch this side-by-side comparison of G-Wagons from 2000 - 2018 to rank the best and worst for interiors, engines, and reliability. This is part 1 of a multi-video series for buying and building your

_Description shortened to 199 of 799 characters._

### Chapters

- [0:00](https://www.youtube.com/watch?v=cCPsdFdlshc&t=0s) G wagon buying guide
- [1:05](https://www.youtube.com/watch?v=cCPsdFdlshc&t=65s) G500 m113 engine overview
- [2:04](https://www.youtube.com/watch?v=cCPsdFdlshc&t=124s) G500 interior and features
- [4:12](https://www.youtube.com/watch?v=cCPsdFdlshc&t=252s) G55 AMG specs and history
- [5:50](https://www.youtube.com/watch?v=cCPsdFdlshc&t=350s) G55 interior and technology
- [8:25](https://www.youtube.com/watch?v=cCPsdFdlshc&t=505s) Best G-Wagon for your budget
- [9:39](https://www.youtube.com/watch?v=cCPsdFdlshc&t=579s) G550 technological leap
- [12:27](https://www.youtube.com/watch?v=cCPsdFdlshc&t=747s) 2016-2018 G-Wagon updates
- [14:01](https://www.youtube.com/watch?v=cCPsdFdlshc&t=841s) Final recommendations

### Transcript

#### G wagon buying guide (0:00)

[0:00](https://www.youtube.com/watch?v=cCPsdFdlshc&t=0s) So you're going to buy a G-Wagon. Which year is best for you? Well, in this video, we're going to do a year-by-year breakdown of the legendary W463 platform, so you can check out the model year ranges, the engine options, and the interior, because if you buy the wrong one, I don't want you getting buyer's remorse or ending up with a bad specimen. My name's Adam. Welcome to the G-Wheel and YouTube channel. I do everything here for the love of G. I'm joined by Joe from Alliance Auto Care. He is the G-Wagon specialist and helped me produce not only these videos, but also the ultimate build and buyer's guide for the G-Wagon. So if you're in the market, click the link in the description right now. Joe, thanks for being here, man.

[0:39] All right. Let's get into it. Let's rock and roll. Let's introduce each one of these three trucks. We're going to hit the year range, the engine options, and give you an interior tour. Let's rock and roll. Cool. We have three trucks here. Starting with our first one, we have a 2000 G500. The second one is a 2012 G55 AMG. The third one is a 2015 G550. We're going to walk through and look at some of the engine options real quick. On the first one, the 2000 G500. Now, there's a couple of models prior to this one, but this is kind of the one everyone gravitates to.

#### G500 m113 engine overview (1:05)

[1:09] This one has what we know the legendary M113 V8. This was Mercedes' big hurrah into the V8s, and this is arguably one of their most reliable V8s out there. Some call it the Land Cruiser Killer. Yeah, it is known as the Land Cruiser Killer. I really like this motor. It's all aluminum. It's super light, and it is as reliable as it gets. Now, some of the key things. It's a single overhead cam motor. It's timing chains. It's two spark plugs per cylinder, and it makes 300 horsepower and 300 foot-pounds of torque. Nice round numbers.

[1:41](https://www.youtube.com/watch?v=cCPsdFdlshc&t=101s) Yeah. It looks simple. It's neat. It's clean. Most importantly, it's easy to work on. Parts are cheap, and parts are available almost everywhere. This is what we call a global motor. Yeah. Sweet. Sweet. It means if you're in Dubai, if you're in India, if you're in Japan, wherever, you can always get parts for it. Or if you're in Arkansas. Let's hop into the inside. Yeah.

> The rest, 2:04 to 18:02, is omitted for length. Fetch it with the get_section tool or the full transcript.

## Video 2: Why I'm Selling My DREAM G-Wagon (Custom Build 2015 Mercedes G550)

- Channel: [Alliance Motorworks](https://www.youtube.com/channel/UCdEjP_BjQ5audhxLKKzZl2A)
- Published: 2026-04-11
- Duration: 11:37
- Source: https://www.youtube.com/watch?v=PzJL3aBRas8
- Language: en
- Transcript: speech-to-text by stt/cloudflare/@cf/openai/whisper-large-v3-turbo

### Description

> Here's how I found it, how I built it, and why I'm selling it. The real story of my 2015 Mercedes G550. For Sale Here:

_Description shortened to 118 of 384 characters._

### Chapters

- [0:00](https://www.youtube.com/watch?v=PzJL3aBRas8&t=0s) Intro
- [0:30](https://www.youtube.com/watch?v=PzJL3aBRas8&t=30s) Background
- [2:45](https://www.youtube.com/watch?v=PzJL3aBRas8&t=165s) The Build
- [4:45](https://www.youtube.com/watch?v=PzJL3aBRas8&t=285s) Ownership
- [6:50](https://www.youtube.com/watch?v=PzJL3aBRas8&t=410s) Why Im Selling
- [8:10](https://www.youtube.com/watch?v=PzJL3aBRas8&t=490s) New Vehicle

14 more lines not shown. Run it to see the whole response.

Export Obsidian notes

POST/api/v1/exports/obsidianExport notes for Obsidian

One Markdown note per video with frontmatter, chapters and timestamp links, and an index note. The server writes nothing: you get the files.

Optional: a collection id from "Create a collection", to export every video in it too.
Default: the collection name, or vid2context
bash
curl https://vid2context.com/api/v1/exports/obsidian \
  -H 'Content-Type: application/json' \
  -d '{
  "inputs": [
    "https://www.youtube.com/watch?v=PzJL3aBRas8"
  ]
}'
Recorded response: 200 OK, 15 ms, 2026-11-15
content-type application/jsonx-ratelimit-remaining 59
{
  "files": [
    {
      "path": "vid2context/Why I'm Selling My DREAM G-Wagon (Custom Build 2015 Mercedes G550).md",

5 more lines not shown. Run it to see the whole response.

Export the definition

GET/api/v1/collections/{id}/exportExport the collection definition

Name, sources, video ids and schedule: everything another server needs to rebuild the collection with POST /collections/import.

Filled in when you run "Create a collection" above.
bash
curl https://vid2context.com/api/v1/collections/g-wagon-research-2c2983f1/export
Recorded response: 200 OK, 4 ms, 2026-11-15
content-type application/jsonx-ratelimit-remaining 55
{
  "format": "vid2context.collection",
  "version": 1,
  "name": "G-Wagon research",
  "description": "Buyer videos to compare model years",
  "sources": [],
  "videos": [
    "https://www.youtube.com/watch?v=cCPsdFdlshc",
    "https://www.youtube.com/watch?v=PzJL3aBRas8"
  ]
}

List the library

GET/api/v1/libraryList the library

Every saved video, newest first. A page with more after it has a cursor to pass back.

bash
curl -G https://vid2context.com/api/v1/library \
  --data-urlencode limit=5
Recorded response: 200 OK, 3 ms, 2026-11-15
content-type application/jsonx-ratelimit-remaining 54
{
  "items": [
    {
      "id": "youtube:MBRqu0YOH14",
      "ref": {
        "input": "https://www.youtube.com/watch?v=MBRqu0YOH14",
        "platform": "youtube",
        "kind": "video",
        "id": "youtube:MBRqu0YOH14",
        "nativeId": "MBRqu0YOH14",
        "url": "https://www.youtube.com/watch?v=MBRqu0YOH14"
      },
      "title": "Optimistic Nihilism",
      "channel": "Kurzgesagt – In a Nutshell",
      "durationSec": 446,
      "origin": "creator-captions",
      "language": "en",
      "savedAt": "2026-11-14T18:44:32.282Z"
    },
    {
      "id": "youtube:cCPsdFdlshc",
      "ref": {
        "input": "https://www.youtube.com/watch?v=cCPsdFdlshc",
        "platform": "youtube",
        "kind": "video",
        "id": "youtube:cCPsdFdlshc",
        "nativeId": "cCPsdFdlshc",
        "url": "https://www.youtube.com/watch?v=cCPsdFdlshc"
      },
      "title": "Best & Worst G-Wagon Years: Reliability, Interiors & Engines Ranked!",
      "channel": "Alliance Motorworks",
      "durationSec": 1084,
      "origin": "stt",
      "language": "en",
      "savedAt": "2026-11-14T17:39:41.222Z"
    },
    {
      "id": "youtube:PzJL3aBRas8",
      "ref": {
        "input": "https://www.youtube.com/watch?v=PzJL3aBRas8",
        "platform": "youtube",
        "kind": "video",
        "id": "youtube:PzJL3aBRas8",
        "nativeId": "PzJL3aBRas8",
        "url": "https://www.youtube.com/watch?v=PzJL3aBRas8"
      },
      "title": "Why I'm Selling My DREAM G-Wagon (Custom Build 2015 Mercedes G550)",
      "channel": "Alliance Motorworks",
      "durationSec": 697,
      "origin": "stt",
      "language": "en",
      "savedAt": "2026-11-14T17:37:21.803Z"
    }
  ]
}

Read one saved video

GET/api/v1/library/{id}One saved video

The saved VideoContext, read from storage without contacting the platform.

platform:id, as the library list shows it
bash
curl https://vid2context.com/api/v1/library/youtube%3AMBRqu0YOH14
Recorded response: 200 OK, 3 ms, 2026-11-15
content-type application/jsonetag "o4kVFBwkWnE8cOaYXiSqH5bbnV2"x-ratelimit-remaining 53
{
  "metadata": {
    "ref": {
      "input": "https://www.youtube.com/watch?v=MBRqu0YOH14",
      "platform": "youtube",
      "kind": "video",
      "id": "youtube:MBRqu0YOH14",
      "nativeId": "MBRqu0YOH14",
      "url": "https://www.youtube.com/watch?v=MBRqu0YOH14"
    },
    "title": "Optimistic Nihilism",
    "description": "The philosophy of Kurzgesagt.\n\n\nOUR CHANNELS\n▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀\nGerman Channel: https://kgs.link/youtubeDE \nSpanish Channel: https://kgs.link/youtubeES \n\n\nHOW CAN YOU SUPPORT US?\n▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀\nThis is how we make our living and it would be a pleasure if you support us!\n\nGet Merch designed with ❤ from https://kgs.link/shop  \nJoin the Patreon Bird Army 🐧 https://kgs.link/patreon  \n\n\nDISCUSSIONS & SOCIAL MEDIA\n▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀\nReddit:            https://kgs.link/reddit\nInstagram:     https://kgs.link/instagram\nTwitter:           https://kgs.link/twitter\nFacebook:      https://kgs.link/facebook\nDiscord:          https://kgs.link/discord\nNewsletter:    https://kgs.link/newsletter\n\n\nOUR VOICE\n▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀\nThe Kurzgesagt voice is from \nSteve Taylor:  https://kgs.link/youtube-voice\n\n\nOUR MUSIC ♬♪\n▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀\n700+ minutes of Kurzgesagt Soundtracks by Epic Mountain:\n\nSpotify:            https://kgs.link/music-spotify\nSoundcloud:   https://kgs.link/music-soundcloud\nBandcamp:     https://kgs.link/music-bandcamp\nYoutube:          https://kgs.link/music-youtube\nFacebook:       https://kgs.link/music-facebook\n\nThe Soundtrack of this video:\nSoundcloud: http://bit.ly/2vZRSnI\nBandcamp: http://bit.ly/2tYuKUY\nFacebook: http://bit.ly/2qW6bY4\n\n\nHelp us caption & translate this video!\n\nhttp://www.youtube.com/timedtext_cs_panel?c=UCsXVk37bltHxD1rDPwtNM8Q&tab=2\n\nOptimistic Nihilism",
    "durationSec": 446,
    "publishedAt": "2017-07-26",
    "thumbnailUrl": "https://i.ytimg.com/vi/MBRqu0YOH14/maxresdefault.jpg",
    "language": "en",
    "tags": [
      "optimism",
      "existence",
      "existential",
      "meaning of life",
      "purpose",
      "existentialism",
      "atheism",
      "philosophy",
      "nihilism"
    ],
    "chapters": [],
    "isLive": false,
    "extra": {
      "viewCount": 18903134,
      "likeCount": 982145,
      "dateText": "Jul 26, 2017",
      "channelHandle": "@kurzgesagt",
      "channelHandleUrl": "https://www.youtube.com/@kurzgesagt",
      "subscriberCountText": "25.8M subscribers",
      "isShort": false,
      "isLive": false,
      "isUpcoming": false,
      "isLiveContent": false,
      "ageRestricted": false,
      "membersOnly": false,
      "playability": "OK",
      "links": [
        "https://kgs.link/youtubeDE",
        "https://kgs.link/youtubeES",
        "https://kgs.link/shop",
        "https://kgs.link/patreon",
        "https://kgs.link/reddit",
        "https://kgs.link/instagram",
        "https://kgs.link/twitter",
        "https://kgs.link/facebook",
        "https://kgs.link/discord",
        "https://kgs.link/newsletter",
        "https://kgs.link/youtube-voice",
        "https://kgs.link/music-spotify",
        "https://kgs.link/music-soundcloud",
        "https://kgs.link/music-bandcamp",
        "https://kgs.link/music-youtube",
        "https://kgs.link/music-facebook",
        "http://bit.ly/2vZRSnI",
        "http://bit.ly/2tYuKUY",
        "http://bit.ly/2qW6bY4",
        "http://www.youtube.com/timedtext_cs_panel?c=UCsXVk37bltHxD1rDPwtNM8Q&tab=2"
      ]
    },
    "channel": {
      "name": "Kurzgesagt – In a Nutshell",
      "id": "UCsXVk37bltHxD1rDPwtNM8Q",
      "url": "https://www.youtube.com/channel/UCsXVk37bltHxD1rDPwtNM8Q"
    }
  },
  "transcript": {
    "ref": {
      "input": "https://www.youtube.com/watch?v=MBRqu0YOH14",
      "platform": "youtube",
      "kind": "video",
      "id": "youtube:MBRqu0YOH14",
      "nativeId": "MBRqu0YOH14",
      "url": "https://www.youtube.com/watch?v=MBRqu0YOH14"

490 more lines not shown. Run it to see the whole response.

Saved videos answer without contacting the platform. GET /context?url=...&refresh=1 reads a video again and replaces the saved copy. Build a research collection walks through these requests in order.

Where examples run

Any vid2context server: your own deployment, or one started from a clone of the repo with VID2CONTEXT_CORS_ORIGINS=this origin npm run start:server (it listens on http://127.0.0.1:8787). The CORS variable lets this page read its responses.

Only for servers that set VID2CONTEXT_API_KEYS. Sent as Authorization: Bearer, kept in this tab's session storage, and never written into the snippets (they read $VID2CONTEXT_API_KEY).