Contextual AI
Contextual AI is an enterprise RAG platform built around a Grounded Language Model (GLM) engineered to minimize hallucinations. Its REST API exposes end-to-end RAG agents (create, configure, query) plus standalone component APIs - Generate, Rerank, Parse, and LMUnit - over datastores of ingested documents, all authenticated with a Bearer API key.
APIs
Contextual AI Agents API
Create, configure, edit, copy, reset, and delete enterprise RAG agents, including system prompts, suggested queries, templates, and associated datastores.
Contextual AI Agent Query API
Query an agent for grounded responses with inline attributions, retrieval contents, and groundedness scores; supports SSE token streaming via stream=true, retrievals-only mode, ...
Contextual AI Datastores & Documents API
Create and manage datastores and ingest documents (PDF, HTML, DOC(X), PPT(X), images) with custom metadata; list, retrieve, update, and delete documents and their parsed chunks.
Contextual AI Generate API
Standalone grounded generation with the Grounded Language Model (GLM v1/v2) - responses are grounded in supplied knowledge to minimize hallucinations, with a 32,000-token reques...
Contextual AI Rerank API
Instruction-following reranker (ctxl-rerank-v2 multilingual / mini and v1) that reorders retrieved passages by relevance, steerable with natural-language instructions on recency...
Contextual AI Parse API
Asynchronous document parsing that converts PDFs, Office files, and images into AI-ready markdown with inferred hierarchy and positional metadata; submit a job, then poll status...
Contextual AI LMUnit Evaluation API
Evaluate model responses with fine-grained natural-language unit tests, returning a continuous 1-5 score for criteria such as conciseness, technical precision, and groundedness.
Event Specifications
Contextual AI Agent Query Streaming (HTTP + SSE)
AsyncAPI 2.6 description of Contextual AI's **agent query streaming** surface. Contextual AI does not publish a WebSocket API. The only asynchronous / event-style transport docu...
ASYNCAPI