This documentation provides a professional reference for verifying and interacting with the PointerRAG backend API.
All API requests were made to:
http://localhost:8000/api/v1
Endpoint: POST /chat/
Creates a new persistent chat session.
Payload:
{
"title": "My New Chat"
}Endpoint: GET /chat/
Returns all chat sessions sorted by recent activity.
Endpoint: GET /chat/{chat_id}
Returns the full conversation history for a chat.
Endpoint: POST /chat/{chat_id}/message
Sends a user message and triggers a RAG-based AI response.
Payload:
{
"role": "user",
"content": "What does this document say?"
}Endpoint: DELETE /chat/{chat_id}
Deletes the chat history and its associated vector embeddings.
Endpoint: POST /ingest
Uploads a file (PDF, TXT, MD) to be parsed, chunked, and stored in the vector database.
| Field | Type | Description |
|---|---|---|
chat_id |
Form Data (String) | Unique identifier for the chat session. |
file |
Form Data (File) | The document file to upload. |
curl -X POST "http://localhost:8000/api/v1/ingest" \
-F "chat_id=1" \
-F "file=@your-document.pdf"Endpoint: POST /vector/search
Retrieves the most relevant document chunks for a given query.
| Field | Type | Description |
|---|---|---|
chat_id |
String | The chat session to search within. |
query |
String | The search text. |
top_k |
Integer | (Optional) Number of results to return. Default: 5. |
curl -X POST "http://localhost:8000/api/v1/vector/search" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "1",
"query": "What are the key findings?",
"top_k": 5
}'Endpoint: GET /vector/stats/{chat_id}
Returns standard statistics about a chat's document collection.
| Parameter | Description |
|---|---|
chat_id |
The unique identifier of the chat. |
curl "http://localhost:8000/api/v1/vector/stats/1"Endpoint: /health
Verifies the status of the backend services (ChromaDB, Embedding Model).
curl "http://localhost:8000/health"