Documentation

VectorFin REST API reference and delivery guides.

Authentication

All requests require an X-API-Key header with your VectorFin API key. Get your key from app.vectorfinancials.com.

# Get AAPL earnings embeddings for Q3 2024
curl https://api.vectorfinancials.com/v1/embeddings/AAPL \
  -H "X-API-Key: vf_sk_your_key_here" \
  -G \
  -d "fiscal_period=2024-Q3" \
  -d "limit=10"

# Response
{
  "data": [{
    "ticker": "AAPL",
    "fiscal_period": "2024-Q3",
    "chunk_idx": 0,
    "text": "Good afternoon, everyone...",
    "embedding": [0.023, -0.091, ...],  // 768 dimensions
    "effective_ts": "2024-11-01T00:00:00Z",
    "knowledge_ts": "2024-11-02T08:30:00Z",
    "model_version": "gemini-embedding-2-preview"
  }],
  "next_cursor": "eyJvZmZzZXQiOjEwfQ=="
}
RAG QUICKSTART

Building a financial RAG pipeline on VectorFin

VectorFin is designed as a drop-in retrieval layer for Retrieval-Augmented Generation (RAG). Embed the user's question with the same model we use (gemini-embedding-2-preview), call POST /v1/embeddings/search, then pass the top chunks to your LLM with citations.

import os, requests, google.generativeai as genai

genai.configure(api_key=os.environ["GEMINI_API_KEY"])
VF_KEY = os.environ["VECTORFIN_API_KEY"]

question = "What did Apple management say about services margins in 2024?"

# 1. Embed the query with the same model VectorFin uses.
q_vec = genai.embed_content(
    model="gemini-embedding-2-preview",
    content=question,
    task_type="retrieval_query",
)["embedding"]

# 2. Retrieve the top-k chunks (the "R" in RAG).
hits = requests.post(
    "https://api.vectorfinancials.com/v1/embeddings/search",
    headers={"X-API-Key": VF_KEY},
    json={"query_vector": q_vec, "ticker": "AAPL", "top_k": 8},
).json()["data"]

# 3. Ground the LLM with citations (the "AG" in RAG).
context = "\n\n".join(
    f"[{h['ticker']} {h['fiscal_period']} chunk {h['chunk_idx']}] {h['text']}"
    for h in hits
)
answer = genai.GenerativeModel("gemini-2.0-flash").generate_content(
    f"Answer using ONLY the context below, citing [ticker fiscal_period chunk_idx].\n\n"
    f"Context:\n{context}\n\nQuestion: {question}"
)
print(answer.text)

Want point-in-time RAG (e.g. answer Q2 2022 questions without future information)? Pass knowledge_ts_max in the search body — the bitemporal index filters out anything we learned after that date.

Getting Started

AuthenticationAPI key authentication via X-API-Key header
Rate limitingPer-plan limits, 429 responses with Retry-After
Paginationcursor-based pagination on all list endpoints
ErrorsStandard error codes and messages

Embeddings API

GET /v1/embeddings/{ticker}List embedding chunks for a ticker
GET /v1/embeddings/{ticker}/{fiscal_period}Embeddings for a specific quarter
POST /v1/embeddings/searchSemantic similarity search across all tickers
GET /v1/embeddings/filings/{ticker}SEC filing embeddings (10-K/10-Q sections)

Signals API

GET /v1/signals/{ticker}All signals for a ticker
GET /v1/signals/{ticker}/regimeMarket regime classification
GET /v1/signals/{ticker}/volatilityGARCH volatility forecasts (1d/5d/21d)
GET /v1/signals/{ticker}/sentiment_driftEarnings sentiment drift vectors
GET /v1/signals/{ticker}/anomalyAnomaly detection scores and flags
GET /v1/signals/{ticker}/scoreWhyStock composite quant score
POST /v1/signals/batchBatch signals for up to 500 tickers

Delivery

REST APIJSON, all plans. Base URL: api.vectorfinancials.com
GCS ParquetStarter+: raw parquet files pushed to your GCS bucket
Iceberg via PolarisPro+: Polaris REST catalog at catalog.vectorfinancials.com
BigQuery Analytics HubPro+: shared datasets via Analytics Hub
Snowflake MarketplacePro+: native Iceberg tables in Snowflake