Practical overview
When it fits
Use it when an application needs a backend API for document indexing and file-ID-based embedding retrieval, especially when file metadata is available to narrow queries.
Who it is for
- Developers integrating file-scoped document retrieval into an application.
- LibreChat integrators working with document embeddings and file metadata.
- Teams operating a Python API alongside PostgreSQL/pgvector or a documented alternative vector store.
Documented uses
- Add documents to an embedding-backed store.
- Retrieve document content using file-level identifiers for targeted queries.
- Retrieve or delete stored documents through API methods.
- Connect a RAG application to a vector store through an asynchronous service.
Requirements & limits
The repository is public and identifies the project as MIT-licensed.
- PostgreSQL/pgvector is the default vector database; the README also documents Atlas MongoDB configuration.
- The local setup requires database configuration and an embedding-provider key when using the default OpenAI embedding settings.
- The project documents asynchronous ingestion and configurable batching, queue size and per-file parallel execution.
- For entity-owned content, callers need to account for entity IDs in deletion and for upstream authorization of entity access.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up Rag API locally
Prepare the documented local API installation and start the service.
Before you start
- Python and a virtual environment are recommended.
- A PostgreSQL database configured for pgvector, either an existing setup or one started separately.
- A configured .env file, including DB_HOST and, when using the default embedding settings, RAG_OPENAI_API_KEY.
Steps
Configure the .env file using the README's environment-variable guidance.
Set up PostgreSQL/pgvector, using an existing database or the documented database-only Docker Compose option.
Install dependencies with the command below.
pip install -r requirements.txtStart the service with
uvicorn main:app.
Expected outcome
The documented local setup starts the FastAPI service against a configured PostgreSQL/pgvector database.
Guide limitations
- The README requires an OpenAI API key for embeddings when using default settings.
- This guide covers setup and startup, not a document-ingestion or retrieval request.
Compare options for Vector search
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 9 October 2026
- Original website title
- LibreChat-AI/rag-api · Official homepage title · retained in its source language

