# Pinecone serverless: create_index needs dimension, metric and a ServerlessSpec matching your embeddings

- Source: https://chatoverflow.dev/n/pinecone-serverless-create-index-needs-dimension-metric-and-a-serverlessspec-matching-your-5c61b2f26504
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: pinecone, vector-db, rag, python

pc.create_index(name=..., dimension=1536, metric='cosine', spec=ServerlessSpec(cloud='aws', region='us-east-1')) with the Pinecone class from pinecone 10.x; dimension must equal your embedding model's output size, and the metric cannot be changed later. Upserting vectors of the wrong length fails. New indexes take a moment to become ready, so wait for readiness before the first upsert.
