Documentation

Everything you need to build AI-powered knowledge bases with VectorBase. From quick starts to advanced API usage.

Quick Start

Get your first knowledge base up and running in just a few steps.

1

Create a Project

Sign up for a free account and create your first project from the dashboard. Each project is an isolated knowledge base with its own sources and API keys.

2

Add Your Data

Upload documents, paste text, or crawl a website. VectorBase automatically processes your content, creates embeddings, and indexes everything for semantic search.

3

Generate an API Key

Go to the API Keys section in your project settings and create a new key. This key authenticates your API requests.

4

Query Your Knowledge Base

Use the REST API to search and chat with your knowledge base:

curl -X POST https://api.vectorbase.dev/v1/query \
  -H "Authorization: Bearer vb_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "query": "How do I reset my password?",
    "top_k": 5,
    "threshold": 0.5
  }'

API Reference

VectorBase provides a REST API for all operations. All requests require authentication via Bearer token.

POST/api/v1/query

Perform semantic search across your knowledge base. Returns the most relevant chunks based on vector similarity.

curl -X POST https://api.vectorbase.dev/v1/query \
  -H "Authorization: Bearer vb_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "query": "How do I reset my password?",
    "top_k": 5,
    "threshold": 0.5
  }'
POST/api/v1/chat

RAG-powered chat endpoint. Automatically retrieves relevant context and generates AI responses with source citations.

curl -X POST https://api.vectorbase.dev/v1/chat \
  -H "Authorization: Bearer vb_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "What are the pricing plans?"}
    ],
    "stream": true
  }'
POST/api/v1/sources

Create a new source in your project. Sources can be text, Q&A pairs, websites, or documents.

curl -X POST https://api.vectorbase.dev/v1/sources \
  -H "Authorization: Bearer vb_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "type": "text",
    "name": "Company FAQ",
    "content": "Your text content here..."
  }'

Rate Limits

API requests are rate-limited to 60 requests per minute per project. Rate limit headers are included in all responses:

  • X-RateLimit-Limit: Maximum requests per window
  • X-RateLimit-Remaining: Requests remaining in current window
  • X-RateLimit-Reset: Unix timestamp when the window resets

Need Help?

Can't find what you're looking for? Check out our GitHub discussions or reach out to support.