Get Started
Core Concepts
Utilities
Integrations
Resources
copy markdown
Precontext allow you to access the detailed results from specialized processes that Interfaze runs internally to process your requests. These outputs provide transparency into the multi-step processing that happens behind the scenes, giving you access to intermediate results like OCR data, structured extractions etc.
precontext Field in ResponsesThe precontext field contains an array of pre-processing execution results. Each entry includes the process name and its detailed output, providing visibility into the specialized steps taken before generating the final response.
In streaming mode, the precontext data is sent as a single chunk before the main response begins streaming. This chunk follows a structured format that encapsulates all pre-processing information upfront.
Note: LangChain SDK does not provide an official way to access raw API responses, so we cannot include an example for that SDK at this time.
OpenAI SDK
Vercel AI SDK
Each index in the precontext array contains:
name: The name of the specialized process used (e.g., "ocr", "extraction", "analysis")result: The detailed output from that process, containing structured data specific to the task