Skip to main content

Overview

VecLabs is designed for seamless migration from Pinecone. The SolVec API intentionally matches Pinecone’s client interface, making migration a matter of changing 3 lines of code.

88% Cost Savings

~8/monthvs8/month vs 70/month for 1M vectors

Faster Queries

1.9ms p50 vs ~8ms on Pinecone s1

Data Ownership

Encrypted with your Solana wallet key

Verifiable

On-chain Merkle root on Solana

Quick Migration

Python

The migration is three line changes. Everything else stays identical.
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")
index = pc.Index("my-index")

# All operations below stay the same
index.upsert(vectors=[...])
results = index.query(vector=[...], top_k=10)
index.delete(ids=["vec1", "vec2"])

TypeScript

import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });
const index = pc.index('my-index');

// All operations below stay the same
await index.upsert([...]);
const results = await index.query({ vector: [...], topK: 10 });
await index.deleteMany(['vec1', 'vec2']);

API Mapping

Client Initialization

PineconeSolVecNotes
Pinecone(api_key=...)SolVec(wallet=...)Replace API key with Solana wallet path
pc.Index("name")sv.collection("name")Index → Collection (same concept)
N/Anetwork="devnet"Choose Solana network (devnet/mainnet)

Collection Operations

OperationPineconeSolVecCompatibility
Upsertindex.upsert(vectors=[...])collection.upsert([...])✅ 100% compatible
Queryindex.query(vector=[...], top_k=10)collection.query(vector=[...], top_k=10)✅ 100% compatible
Deleteindex.delete(ids=[...])collection.delete(ids=[...])✅ 100% compatible
Fetchindex.fetch(ids=[...])collection.fetch(ids=[...])✅ 100% compatible
Statsindex.describe_index_stats()collection.describe_index_stats()✅ 100% compatible
VerifyN/Acollection.verify()⭐ New feature

Complete Example

Here’s a real-world RAG (Retrieval-Augmented Generation) migration:
from pinecone import Pinecone
from openai import OpenAI

# Initialize clients
pc = Pinecone(api_key="pk-xxxxx")
index = pc.Index("rag-docs")
openai_client = OpenAI()

# Generate embedding
response = openai_client.embeddings.create(
    model="text-embedding-3-small",
    input="What is vector search?"
)
query_vector = response.data[0].embedding

# Store documents
index.upsert(vectors=[
    {
        "id": "doc_001",
        "values": [...],  # 1536-dim embedding
        "metadata": {
            "text": "Vector search finds similar items...",
            "source": "docs.pdf",
            "page": 12
        }
    },
    {
        "id": "doc_002",
        "values": [...],
        "metadata": {
            "text": "HNSW is a graph-based algorithm...",
            "source": "paper.pdf",
            "page": 3
        }
    }
])

# Query for context
results = index.query(
    vector=query_vector,
    top_k=5,
    include_metadata=True
)

# Build LLM context
context = "\n".join([match.metadata["text"] for match in results.matches])
print(f"Found {len(results.matches)} relevant documents")
What changed: 3 lines at the top. What stayed the same: Everything else.

Configuration Mapping

Environment Setup

export PINECONE_API_KEY="pk-xxxxx"
export PINECONE_ENV="us-east-1-aws"

Index/Collection Configuration

FeaturePineconeSolVec
DimensionsSet during index creationsv.collection("name", dimensions=1536)
Metricmetric="cosine"metric="cosine" (default)
Namespaceindex.upsert(..., namespace="ns")Use separate collections
Podspod_type="p1"Not needed (decentralized)
Replicasreplicas=2Built-in (Solana validators)

Key Differences

What’s Different

Authentication

Pinecone: API key
SolVec: Solana wallet keypair

Infrastructure

Pinecone: Managed pods
SolVec: Decentralized Rust engine + Shadow Drive

Billing

Pinecone: Monthly subscription
SolVec: Pay-per-transaction (Solana fees)

Data Location

Pinecone: AWS/GCP regions
SolVec: Encrypted on Shadow Drive

New Capabilities

VecLabs adds features that Pinecone cannot offer:
# Verify collection integrity against on-chain Merkle root
proof = collection.verify()
print(f"On-chain root: {proof.on_chain_root}")
print(f"Local root:    {proof.local_root}")
print(f"Match:         {proof.match}")  # True if data is intact
print(f"Proof URL:     {proof.solana_explorer_url}")
Why this matters:
  • Pinecone requires trusting their infrastructure
  • VecLabs provides cryptographic proof your data hasn’t changed
  • Anyone can verify the Merkle root on Solana Explorer

Migration Checklist

1

Install SolVec SDK

pip install solvec --pre  # Python
npm install solvec@alpha  # TypeScript
2

Set up Solana wallet

solana-keygen new --outfile ~/.config/solana/id.json
solana airdrop 2 --url devnet  # For testing
3

Update client initialization

Replace Pinecone(api_key=...) with SolVec(wallet=...)
4

Replace Index() with collection()

Change pc.Index("name") to sv.collection("name", dimensions=1536)
5

Test your queries

Run existing query code — it should work without changes
6

Optional: Add verification

Use collection.verify() to get on-chain proof

Response Format Compatibility

Query responses use the exact same structure:
# Both Pinecone and SolVec return identical structure
results = index.query(vector=[...], top_k=5)

for match in results.matches:
    print(match.id)        # "doc_001"
    print(match.score)     # 0.92
    print(match.metadata)  # {"text": "...", "source": "..."}
    print(match.values)    # [...] if include_values=True
SolVec adds one extra field:
results.namespace  # Collection name (Pinecone calls this namespace)

Performance Comparison

Benchmarked on M2 MacBook, 100K vectors, 384 dimensions:
MetricPinecone (s1)VecLabs
p50 latency~8ms1.9ms (4.2x faster)
p95 latency~15ms2.8ms (5.4x faster)
p99 latency~25ms4.3ms (5.8x faster)
Monthly cost (1M vectors)$70$8 (88% cheaper)
Why VecLabs is faster:
  • Rust HNSW core (no garbage collector)
  • In-memory graph structure
  • SIMD-optimized distance calculations

Need Help?

Discord Community

Ask migration questions in #support

GitHub Examples

See full migration examples

API Reference

Complete SolVec API docs

Architecture

Understand how VecLabs works

Next Steps

Deploy to Production

Learn how to deploy your SolVec collection to Solana mainnet

Build docs developers (and LLMs) love