Skip to main content
Pinecone Docs
current

Search documentation

Type to search this documentation.

Create a collection

Create a Pinecone collection.

Collections are supported only for pod-based indexes. Pod-based indexes cannot be created with API version 2026-07, so this operation applies to pod-based indexes created with an earlier API version.

curl
PINECONE_API_KEY="YOUR_API_KEY"

curl -s "https://api.pinecone.io/collections" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "X-Pinecone-Api-Version: 2026-07" \
  -d '{
        "name": "example-collection",
        "source": "docs-example"
  }'

POST /collections

201
{
  "name": "example-collection",
  "size": 10000000,
  "status": "Initializing",
  "dimension": 1536,
  "vector_count": 120000,
  "environment": "us-east1-gcp"
}
400
{
  "error": {
    "code": "INVALID_ARGUMENT",
    "message": "Bad request. The request body included invalid request parameters."
  },
  "status": 400
}
402
{
  "error": {
    "code": "PAYMENT_REQUIRED",
    "message": "Request failed. Pay all past due invoices to lift restrictions on your account."
  },
  "status": 402
}
403
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Collection exceeds quota. Maximum allowed on your account is 1. Currently have 1."
  },
  "status": 403
}
404
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Index example-index not found."
  },
  "status": 404
}
409
{
  "error": {
    "code": "ALREADY_EXISTS",
    "message": "Resource already exists."
  },
  "status": 409
}
422
{
  "error": {
    "code": "UNPROCESSABLE_ENTITY",
    "message": "Failed to deserialize the JSON body into the target type: missing field `metric` at line 1 column 16"
  },
  "status": 422
}
Api-Keystringrequired

An API Key is required to call Pinecone APIs. Get yours from the console.

X-Pinecone-Api-Versionstringrequired

Required date-based version header

Typestring
Default2026-07
namestringrequired

The name of the collection to be created. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.

Required string length: 1 - 45

Typestring
sourcestringrequired

The name of the index to be used as the source for the collection.

Example: example-source-index

Typestring

201 — The collection has been successfully created.

The CollectionModel describes the configuration and status of a Pinecone collection.

namestringrequired

The name of the collection.

Example: example-collection

Typestring
size?integer

The size of the collection in bytes.

Example: 10000000

Typeinteger
statusstringrequired

The status of the collection. Possible values: Initializing, Ready, Terminating, or Terminated.

Example: Initializing

Typestring
dimension?integer

The dimension of the vectors stored in each record held in the collection.

Required range: 1 <= x <= 20000. Example: 1536

Typeinteger
vector_count?integer

The number of records stored in the collection.

Example: 120000

Typeinteger
environmentstringrequired

The environment where the collection is hosted.

Example: us-east1-gcp

Typestring
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu