DocsDatabases
Pinecone
A fully-managed, serverless vector database. Zero ops, pay per read/write, scales to billions of vectors.
At a glance
License
Proprietary / managed
Hosting
Cloud only
Default index
Serverless (HNSW-class)
Best for
Teams that want zero ops
Create an index
ts
import { Pinecone } from "@pinecone-database/pinecone";
const pc = new Pinecone({ apiKey: process.env.PINECONE_API_KEY! });
await pc.createIndex({
name: "docs",
dimension: 1536,
metric: "cosine",
spec: { serverless: { cloud: "aws", region: "us-east-1" } },
});Upsert and query
ts
const index = pc.index("docs");
await index.upsert([
{ id: "doc-1", values: vector, metadata: { source: "intro.md" } },
]);
const { matches } = await index.query({
vector: queryVector,
topK: 5,
includeMetadata: true,
});When to pick Pinecone
Pick Pinecone when you want a credit card to replace a platform team. Serverless pricing is read/write-based, so spikey workloads stay cheap. Avoid it if you need on-prem or strict data residency outside AWS/GCP/Azure regions Pinecone supports.