Context adapter
The `context` field is the shared input adapter in the Vidbyte API. It lets callers attach source material without forcing every route family to invent its own attachment format.
Why it exists
A route like roadmap creation should not need one path for inline text, another for PDFs, another for prior Vidbyte artifacts, and another for imported provider content. The context adapter gives the caller one stable contract while the middleware does the type-specific work behind the boundary.
That keeps route DTOs ergonomic and lets Vidbyte grow the kinds of source material it can accept without redesigning every endpoint family.
Supported types
Text
Use inline text for learner profiles, prompts, notes, or source excerpts you already have as strings.
Docs
Use document-backed context when the source comes from extracted text or an encoded document payload.
PDFs
Use PDF-backed context when the source material starts as a PDF that needs to be resolved before generation.
Vidbyte IDs
Use encrypted public ids to attach prior quickhits, roadmaps, quizzes, exams, or projects as context.
Connector imports
Use imported provider material after Google Drive or Notion content has been normalized into the context layer.
Example payload
JSON
Context payload
[
{ "type": "text", "label": "learner_profile", "text": "Intermediate backend engineer preparing for staff interviews" },
{ "type": "doc", "filename": "notes.md", "file": "<base64 payload>" },
{ "type": "roadmap", "id": "rdm_Qj3Y5N0k2b", "module_number": 2 }
]