0Pricing
AI Engineering Academy · Lesson

Getting Started with Pinecone

Create a Pinecone index, upsert vectors with metadata, perform similarity queries with filters, and manage namespaces to separate different data collections.

What Is Pinecone?

Pinecone is a fully managed vector database that handles infrastructure, scaling, and backups automatically. You interact with it through a Python SDK, sending vectors and metadata via API calls. Pinecone stores them on its servers and answers similarity queries at low latency, even at billions of vectors.

It offers a free tier that is sufficient for learning and small production workloads.

Installing the Pinecone SDK

Install the Pinecone client and initialize it with your API key. Store the API key in an environment variable — never hardcode secrets in source files. The Pinecone class is the main entry point for all operations.

# pip install pinecone-client
import os
from pinecone import Pinecone

pc = Pinecone(api_key=os.environ['PINECONE_API_KEY'])

# List existing indexes to verify connection
existing = pc.list_indexes().names()
print('Existing indexes:', existing)

All lessons in this course

  1. Why You Need a Vector Database
  2. Getting Started with Pinecone
  3. pgvector: Embeddings in PostgreSQL
  4. Choosing and Benchmarking Vector Stores
← Back to AI Engineering Academy