Skip to main content
Vector stores is RAG-as-a-service: create a collection, upload text, and Geek Hub handles chunking + embedding + storage in pgvector with an HNSW index. Query with cosine similarity top-k. When to use this vs your own pgvector/Pinecone:
  • RAG prototype in hours, not days
  • One less service to operate
  • Cost inline on every operation (same tokenization as /v1/embeddings)
  • Isolated per org via Supabase RLS
When NOT:
  • More than ~1M chunks — HNSW index starts eating Postgres RAM
  • Complex metadata filtering (hybrid search, reranking) — use a dedicated DB
  • You already have an embeddings pipeline — no gain

Create collection

Returns the store id, used in subsequent calls.

Upload text

The gateway:
  1. Splits text into ~512-token chunks with 64 overlap
  2. Embeds all chunks (batched to provider)
  3. Inserts into pgvector with your metadata
  4. Bills the embedding input_tokens
Response:

Query top-k

Response:
similarity ranges from 1 (identical) to -1 (opposite). In practice > 0.7 is usable.

Other endpoints

  • GET /v1/vector-stores — lists all stores for your org
  • GET /v1/vector-stores/:id — details + files
  • DELETE /v1/vector-stores/:id — drops store + cascades to files and chunks

Costs

  • Upload and query embeddings: tokens × store model price
  • Storage: free in v1 (subject to change if it starts costing us)
  • Query: only the query embedding (not the stored corpus)

Roadmap

  • PDF/DOCX upload with server-side parsing
  • Hybrid search (BM25 + vectors)
  • Metadata filtering with filter: { key: value }
  • LLM-based semantic chunking