Skip to main content

1. Install and run

pip install "ragrails[server-qdrant]"
export VOYAGE_API_KEY="..."
export OPENAI_API_KEY="..."
docker run -p 6333:6333 qdrant/qdrant
ragrails-api
The server starts on http://127.0.0.1:8000. Explore it at /docs.

2. Build the index

curl -X POST http://127.0.0.1:8000/v1/pipelines/ingest \
  -H "Content-Type: application/json" \
  -d '{
    "docs": {"folder": "files/docs/"},
    "embedding": {"provider": "voyage", "model": "voyage-3"},
    "storage": {"vector_db": "qdrant", "collection": "docs", "url": "http://localhost:6333"}
  }'

3. Query

curl -X POST http://127.0.0.1:8000/v1/pipelines/query \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What does the guide cover?",
    "embedding": {"provider": "voyage", "model": "voyage-3"},
    "retrieval": {"vector_db": "qdrant", "collection": "docs", "url": "http://localhost:6333", "top_k": 5}
  }'

4. Chat

curl -X POST http://127.0.0.1:8000/v1/chat \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What does the guide cover?",
    "llm_provider": "openai",
    "llm_model": "gpt-4o-mini",
    "embedder_provider": "voyage",
    "embedder_model": "voyage-3",
    "vector_db": "qdrant",
    "collection": "docs",
    "url": "http://localhost:6333",
    "history": []
  }'
Pass the returned history back on the next request to keep context.

Next

REST Overview

Every endpoint.

Generate a client

Use the OpenAPI schema at /v1/openapi.json.