VectorAI Developer API Reference

High-Performance, Stateless Multi-Modal Vector Storage, Document Chunking & Hybrid Semantic Search Engine.

💡
Developer Ready: VectorAI enables developers and AI engineers to parse multi-modal documents, generate dense embeddings via BYOK providers (OpenAI, Gemini, Cohere, HuggingFace), index chunks into vector databases (Qdrant, pgvector, Vertex AI, memory), and query at sub-45ms latencies.

🚀 Quickstart Guide

Follow these 3 simple steps to integrate VectorAI into your RAG pipelines or microservices:

1. Get your API Key

Sign in to the VectorAI Developer Console to generate a workspace API key (e.g. sk-lvl1-9988aabbcc...).

2. Ingest Document Content

Send raw text, PDF, DOCX, or CSV URLs to the ingestion gateway. VectorAI automatically chunks, embeds, and indexes your document:

curl -X POST https://vector.acadmyai.com/v1/ingest \
  -H "Authorization: Bearer sk-lvl1-your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "raw_text": "AcadmyAI delivers zero-trust security, vector databases, and quantitative market telemetry across financial and enterprise sectors.",
    "collection_name": "enterprise_kb",
    "chunking_strategy": "recursive",
    "chunk_size": 512,
    "chunk_overlap": 64
  }'
# pip install vectorai-sdk
from vectorai import VectorClient

client = VectorClient(api_key="sk-lvl1-your_api_key_here")

# Ingest text (or pass file_path="doc.pdf" with client.ingest_file)
result = client.ingest(
    raw_text="AcadmyAI delivers zero-trust security, vector databases, and quantitative market telemetry across financial and enterprise sectors.",
    collection_name="enterprise_kb",
    chunking_strategy="recursive",
    chunk_size=512,
    chunk_overlap=64
)
print(f"Chunks created: {result.chunks_created} | Doc ID: {result.doc_id}")
const response = await fetch("https://vector.acadmyai.com/v1/ingest", {
  method: "POST",
  headers: {
    "Authorization": "Bearer sk-lvl1-your_api_key_here",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    raw_text: "AcadmyAI delivers zero-trust security, vector databases, and quantitative market telemetry across financial and enterprise sectors.",
    collection_name: "enterprise_kb",
    chunking_strategy: "recursive",
    chunk_size=512,
    chunk_overlap=64
  })
});

const data = await response.json();
console.log(data);

3. Perform Sub-45ms Semantic Search

Query your collection with natural language queries to retrieve the highest scoring contextual vector chunks:

🌐 Base URL & Environments

All programmatic endpoints are served over secure HTTPS. For local testing with our dockerized sandbox, use the localhost base URL:

Environment Base URL Description
Production Gateway https://vector.acadmyai.com Global low-latency cluster with automatic failover and SLA monitoring.
Local Development http://localhost:8080 In-process local sandbox using memory vector storage & SQLite.

🔐 API Keys & Authentication

VectorAI uses standard Bearer Token authentication. Pass your workspace API key in the Authorization header with all requests:

Authorization: Bearer sk-lvl1-9988aabbcc112233445566778899aabb
🛡️
Security Guarantee: Your raw API keys are never stored in plaintext. They are hashed using SHA-256 upon generation. Furthermore, third-party provider keys (OpenAI, Gemini, Cohere, HuggingFace) in your BYOK profile are encrypted at rest using AES-256-GCM.

🐍 Python SDK (vectorai-sdk)

The official Python SDK provides an idiomatic, high-throughput client for vector ingestion, hybrid semantic search, balance tracking, LangChain/LlamaIndex vector store adapters, and a terminal CLI.

PyPI: vectorai-sdk v1.0.0 Python 3.8+ Apache 2.0 License Mandatory API Key

Installation

# Standard SDK
pip install vectorai-sdk

# With LangChain support
pip install "vectorai-sdk[langchain]"

# With LlamaIndex support
pip install "vectorai-sdk[llamaindex]"

Synchronous Client Quickstart

API keys can be passed explicitly via api_key="..." or auto-detected from the VECTORAI_API_KEY environment variable.

from vectorai import VectorClient

# Initialize client (API Key is mandatory)
client = VectorClient(api_key="sk-lvl1-9988aabbcc112233445566778899aabb")

# 1. Ingest raw text or local document file
result = client.ingest(
    raw_text="VectorAI delivers sub-45ms hybrid semantic vector retrieval for enterprise RAG.",
    collection_name="enterprise_kb",
    chunking_strategy="recursive",
    chunk_size=512,
    chunk_overlap=64,
    metadata={"source": "whitepaper", "year": 2026}
)
print(f"Ingested {result.chunks_created} chunks | Doc ID: {result.doc_id}")

# Ingest local file directly (PDF, DOCX, CSV, Text, Markdown)
file_result = client.ingest_file(
    file_path="./quarterly_earnings_report.pdf",
    collection_name="finance_kb"
)

# 2. Sub-45ms Semantic Search with Hybrid RRF & Neural Rerank
response = client.search(
    query="What is the retrieval latency of VectorAI?",
    collection_name="enterprise_kb",
    limit=3,
    hybrid=True,  # BM25 lexical keyword + dense vector Reciprocal Rank Fusion
    rerank=True   # Cross-encoder neural reranker
)

for item in response:
    print(f"[{item.score:.4f}] Chunk #{item.chunk_index}: {item.text}")

# 3. Check Leftover Quota & Subscription Balances
usage = client.get_usage()
print(f"Plan Tier: {usage.tier} | Days Left: {usage.days_remaining}")
print(f"Chunks Stored: {usage.quota.total_chunks_stored} / {usage.quota.max_chunks_allowed}")
print(f"Chunks Remaining: {usage.chunks_remaining}")

Asynchronous Client (AsyncVectorClient)

For high-throughput FastAPI microservices and async worker tasks:

import asyncio
from vectorai import AsyncVectorClient

async def run_query():
    async with AsyncVectorClient(api_key="sk-lvl1-...") as client:
        results = await client.search(
            query="quantum encryption standards",
            collection_name="security_kb",
            limit=5
        )
        for r in results:
            print(r.score, r.text)

asyncio.run(run_query())

LangChain & LlamaIndex Integrations

Drop VectorAI directly into your existing LangChain or LlamaIndex RAG pipelines:

# LangChain Drop-In
from vectorai.integrations.langchain import VectorAIStore

vectorstore = VectorAIStore(
    api_key="sk-lvl1-...",
    collection_name="product_kb"
)

# Add texts
vectorstore.add_texts(["VectorAI is built for enterprise AI pipelines"])

# Create LangChain retriever
retriever = vectorstore.as_retriever(search_kwargs={"k": 3, "hybrid": True})
docs = retriever.get_relevant_documents("How to integrate VectorAI?")

Terminal CLI Tool (vectorai)

Execute semantic searches, ingest local directories, and inspect quotas directly from your terminal:

# Ingest local file
vectorai ingest ./quarterly_report.pdf --collection finance --strategy recursive

# Run semantic search from terminal
vectorai search "What was our operating cash flow?" --collection finance --limit 3 --hybrid

# Inspect remaining chunk quota & plan expiration
vectorai quota

# Verify cluster SLA health
vectorai health

Document Ingestion API

POST /v1/ingest Bearer API Key

Extracts text from raw strings or remote URLs (PDF, DOCX, CSV, Text), applies the configured chunking strategy, generates high-dimensional embeddings, and indexes vectors into your target vector database.

Request Headers

Header Type Description
Authorization string Required Bearer token format: Bearer sk-lvl1-...
Content-Type string Required Must be application/json

Request Body Parameters

Parameter Type Description
raw_text string Optional* Raw document text content to chunk and embed. (*Either raw_text or source_url is required).
source_url string Optional* Public HTTP/HTTPS URL of a PDF, DOCX, CSV, or Text document to parse.
file_type string Optional Parser hint: text (default), pdf, docx, csv.
collection_name string Optional Target vector collection/index. Defaults to profile's default collection.
chunking_strategy string Optional Chunking algorithm: recursive (default), sentence, paragraph, fixed, semantic.
chunk_size integer Optional Target character count per chunk (default: 512).
chunk_overlap integer Optional Character overlap between consecutive chunks (default: 64).
metadata object Optional Arbitrary key-value metadata attached to each stored vector chunk.

Response Schema (HTTP 200 OK)

{
  "doc_id": "8e3fb2a1-4352-479c-b17d-948f219198ab",
  "status": "success",
  "collection_name": "enterprise_kb",
  "chunks_created": 6,
  "chunking_strategy": "recursive",
  "chunk_size": 512,
  "chunk_overlap": 64,
  "vector_dimensions": 384,
  "provider": "huggingface",
  "embedding_model": "financial"
}

Developer Quota & Balance API

GET /v1/usage Bearer API Key

Enables developer microservices and CI/CD jobs to programmatically query account status, left-over API call balances, chunk storage limits, subscription expiration date, and active BYOK profile settings.

curl -X GET https://vector.acadmyai.com/v1/usage \
  -H "Authorization: Bearer sk-lvl1-your_api_key_here"
# pip install vectorai-sdk
from vectorai import VectorClient

client = VectorClient(api_key="sk-lvl1-your_api_key_here")

# Programmatically check quota, call counters, and days remaining
balance = client.get_usage()
print(f"Tier: {balance.tier} | Days Left: {balance.days_remaining}")
print(f"Chunks Stored: {balance.quota.total_chunks_stored} / {balance.quota.max_chunks_allowed}")
print(f"Chunks Remaining: {balance.chunks_remaining}")
const resp = await fetch("https://vector.acadmyai.com/v1/usage", {
  headers: { "Authorization": "Bearer sk-lvl1-your_api_key_here" }
});
const balance = await resp.json();
console.log(balance);

Response Schema (HTTP 200 OK)

{
  "status": "success",
  "user_id": "usr_7894561230",
  "subscription": {
    "tier": "pro",
    "period": "monthly",
    "is_active": true,
    "expires_at": "2026-09-16T00:00:00Z",
    "days_remaining": 30
  },
  "quota": {
    "rate_limit_rpm": 120,
    "total_ingest_calls": 420,
    "total_search_calls": 1850,
    "total_chunks_stored": 12450,
    "max_chunks_allowed": 500000,
    "chunks_remaining": 487550
  },
  "active_profile": {
    "profile_name": "default",
    "provider": "huggingface",
    "embedding_model": "financial",
    "vector_db_provider": "memory",
    "default_collection": "enterprise_kb",
    "chunking_strategy": "recursive",
    "chunk_size": 512,
    "chunk_overlap": 64
  }
}

Pricing Plans & Throttling Limits API

GET /v1/billing/plans Public (No Auth)

Returns available subscription tiers, pricing schedules in INR, rate limits, max chunk storage limits, and enterprise SLA availability.

curl -X GET https://vector.acadmyai.com/v1/billing/plans

System Health & SLA Endpoint

GET /health Public (No Auth)

Real-time cluster liveness and uptime status probe for load balancers and uptime monitoring services.

Response Schema (HTTP 200 OK)

{
  "status": "ok",
  "version": "1.0.0",
  "timestamp": "2026-08-16T06:30:00Z"
}

🛡️ Security Model & BYOK Architecture

VectorAI enforces zero-trust data segregation across every layer of the API and vector infrastructure:

Security Layer Mechanism Protection Benefit
API Key Hashing SHA-256 with cryptographic salt Raw API keys are never stored in databases; leak-proof authorization.
BYOK Key Vault AES-256-GCM hardware encryption Third-party model tokens (OpenAI, Gemini, Anthropic) are encrypted at rest.
Tenant Isolation Multi-tenant namespaces & collections Vectors and metadata can never be queried across workspace boundaries.
IP Allowlisting CIDR subnet firewall rules Restricts API requests strictly to corporate VPNs and approved CIDR ranges.
Payload Sanitization 10MB limit + MIME type filtering Protects against denial-of-service memory exhaustion and malicious binary inputs.

⚠️ HTTP Error Codes Matrix

VectorAI uses conventional HTTP response codes to indicate API success or failure. All error responses include an informative JSON detail message:

Code Status Name Description & Cause Example Response
200 OK Request succeeded and vectors were ingested or retrieved. {"status": "success"}
400 Bad Request Missing required parameters (e.g. neither raw_text nor source_url provided). {"detail": "Must provide either raw_text or source_url"}
401 Unauthorized Missing Authorization header or invalid API key. {"detail": "Invalid API key — profile not found"}
402 Payment Required Subscription is inactive or expired. Account recharge required. {"detail": "Subscription Required: Your Level 1 subscription is inactive or expired."}
403 Forbidden Caller IP is blocked by IP allowlist, or chunk storage quota exceeded. {"detail": "IP address rejected by user security policy"}
422 Unprocessable Entity Document contained no readable text or produced empty chunks. {"detail": "No text content extracted from document"}
429 Too Many Requests Rate limit exceeded for your tier. Throttled according to plan RPM. {"detail": "Rate limit exceeded (120 requests/minute)"}
500 Server Error Upstream provider timeout or downstream vector DB connection issue. {"detail": "Search failed: Connection timeout"}

⏱️ Rate Limiting Rules

Rate limits are enforced using token bucket algorithms based on your active subscription plan:

Tier Rate Limit (RPM) Chunk Storage Budget SLA
Free Sandbox 15 RPM 10,000 Chunks Best-effort
Pro Developer 120 RPM 500,000 Chunks 99.5% Uptime SLA
Enterprise High-Scale 1,200 RPM Unlimited Chunks 99.9% Uptime SLA + Dedicated Support