Documentation
Everything you need to call the RAGRef API.
Authentication
All requests use a bearer token in the Authorization header. Keys look like rr_live_... and are scoped per project. Treat them like passwords.
Authorization: Bearer rr_live_your_key_here
Endpoints
POST/v1/corpora
Create a new document corpus. Body: name, chunking strategy, optional metadata.
POST/v1/corpora/{id}/ingest
Ingest and chunk documents. Accepts files, URLs, or inline text.
GET/v1/corpora/{id}/stats
Corpus metadata and index health: token counts, chunk counts, replication status.
GET/v1/retrieve
Hybrid sparse-dense retrieval with RRF fusion. Optional rerank pass.
POST/v1/rerank
Cross-encoder reranking of retrieved candidates.
GET/v1/embed
Embeddings, OpenAI-compatible request shape.
Quickstart
# pip install ragref from ragref import RAGRefClient client = RAGRefClient(api_key="rr_live_...") corpus = client.corpora.create(name="support-docs", chunking="semantic") corpus.ingest(path="./docs/", recursive=True) results = client.retrieve( corpus_id=corpus.id, query="How do I reset my 2FA device?", top_k=8, rerank=True, )
SDKs and integrations
Official clients: Python (pip install ragref) and TypeScript (npm install @ragref/sdk). Community integrations: LangChain retriever, LlamaIndex index, Haystack node.