Working with collections

Collections are read-only snapshots of pod indexes. Create one to preserve a pod index’s data before deleting or reconfiguring it. Restoring a collection into a new index is not currently supported by the API (see below). Collections are only supported for pod-based indexes; serverless indexes use backups instead.

Create a collection

Pass the name of the pod index you want to snapshot:

from pinecone import Pinecone

pc = Pinecone(api_key="your-api-key")

collection = pc.collections.create(name="snap-2025-01", source="my-pod-index")
print(collection.status)   # "Initializing" immediately after creation

The collection transitions through InitializingReady when the snapshot is complete. create returns immediately without polling; check status with describe.

List collections

list returns a CollectionList you can iterate or call .names() on:

for col in pc.collections.list():
    print(col.name, col.status)
names = pc.collections.list().names()
print(names)   # e.g. ["snap-2025-01", "archive-q3"]

Describe a collection

describe returns a CollectionModel with detailed information:

col = pc.collections.describe("snap-2025-01")
print(col.name)          # "snap-2025-01"
print(col.status)        # "Ready"
print(col.dimension)     # vector dimension
print(col.vector_count)  # number of vectors stored
print(col.size)          # size in bytes
print(col.environment)   # cloud environment

Poll until ready after creation:

import time

while True:
    col = pc.collections.describe("snap-2025-01")
    if col.status == "Ready":
        break
    time.sleep(5)

Delete a collection

pc.collections.delete("snap-2025-01")

delete raises NotFoundError if the collection does not exist.

Create an index from a collection

Restoring a collection into a new index is not currently supported by the API. pc.indexes.create(source_collection=...) raises PineconeTypeError, and passing source_collection inside a PodSpec (via the deprecated spec= argument) is silently dropped instead of restoring data, so the index comes back empty. See Backups and restore for the supported restore path; it covers serverless and BYOC indexes only, since pod indexes can’t be backed up either.