> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinecone.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a pod-based index

> Create a Pinecone pod-based index. Pod indexes are legacy and unavailable to new customers, and serverless is the current option for new indexes.

> [!WARNING]
>
> Pod-based indexes are legacy. Customers who signed up for a Standard or Enterprise plan on or after August 18, 2025 cannot create them. [Create a serverless index](https://docs.pinecone.io/guides/indexes/create-an-index.md) instead. Serverless indexes use on-demand read capacity by default, or [dedicated read nodes](https://docs.pinecone.io/guides/optimize/dedicated-read-nodes/overview.md) for sustained high query rates and workloads of millions of records or more.

> [!NOTE]
>
> SDKs that target API version `2026-07` don't support creating pod-based indexes, and they reject creating an index from a collection. You can still list, describe, and delete existing collections. To create or restore a pod-based index, use an [SDK version](https://docs.pinecone.io/reference/pinecone-sdks.md#sdk-versions) that targets an earlier API version, or send an earlier `X-Pinecone-Api-Version` with the REST API. To move a pod-based index to serverless, see [Migrate a pod-based index to serverless](https://docs.pinecone.io/guides/legacy/pod-based-indexes/migrate-a-pod-based-index-to-serverless.md).

This page shows you how to create a pod-based index. For guidance on serverless indexes, see [Create a serverless index](https://docs.pinecone.io/guides/indexes/create-an-index.md).

## Create a pod index

To create a pod index, use the [Create an index](https://docs.pinecone.io/reference/api/latest/control-plane/create_index.md) operation as follows:

* Provide a `name` for the index.
* Specify the `dimension` and `metric` of the vectors you'll store in the index. This should match the dimension and metric supported by your embedding model.
* Set `spec.environment` to the [environment](https://docs.pinecone.io/guides/indexes/index-configuration.md#cloud-regions) where the index should be deployed. For Python, you also need to import the `ServerlessSpec` class.
* Set `spec.pod_type` to the [pod type](https://docs.pinecone.io/guides/legacy/pod-based-indexes/understanding-pod-based-indexes.md#pod-types) and [size](https://docs.pinecone.io/guides/indexes/indexing-overview.md#pod-size-and-performance) that you want.

Other parameters are optional. See the [API reference](https://docs.pinecone.io/reference/api/latest/control-plane/create_index.md) for details.

```Python Python theme={null}
from pinecone.grpc import PineconeGRPC as Pinecone, PodSpec

pc = Pinecone(api_key="YOUR_API_KEY")

pc.create_index(
  name="docs-example",
  dimension=1536,
  metric="cosine",
  spec=PodSpec(
    environment="us-west1-gcp",
    pod_type="p1.x1",
    pods=1
  ),
  deletion_protection="disabled"

)
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone'

const pc = new Pinecone({
  apiKey: 'YOUR_API_KEY'
});

await pc.createIndex({
  name: 'docs-example',
  dimension: 1536,
  metric: 'cosine',
  spec: {
    pod: {
      environment: 'us-west1-gcp',
      podType: 'p1.x1',
      pods: 1
    }
  },
  deletionProtection: 'disabled',
});
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;

public class CreateIndexExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
        pc.createPodsIndex("docs-example", 1536, "us-west1-gcp",
                "p1.x1", "cosine", null, null, null, null, null, "disabled", null);
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "fmt"
    "log"

    // CreatePodIndex was removed in v7 (API version 2026-07). Use v6 to create pod-based indexes.
    "github.com/pinecone-io/go-pinecone/v6/pinecone"
)

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    indexName := "docs-example"
  	metric := pinecone.Dotproduct
	  deletionProtection := pinecone.DeletionProtectionDisabled

    idx, err := pc.CreatePodIndex(ctx, &pinecone.CreatePodIndexRequest{
        Name:               indexName,
        Metric:             &metric,
        Dimension:          1536,
        Environment:        "us-east1-gcp",
        PodType:            "p1.x1",
        DeletionProtection: &deletionProtection,
    })
    if err != nil {
        log.Fatalf("Failed to create pod-based index: %v", err)
    } else {
        fmt.Printf("Successfully created pod-based index: %v", idx.Name)
    }
}
```

```bash curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

curl -s "https://api.pinecone.io/indexes" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "X-Pinecone-Api-Version: 2025-10" \
  -d '{
         "name": "docs-example",
         "dimension": 1536,
         "metric": "cosine",
         "spec": {
            "pod": {
               "environment": "us-west1-gcp",
               "pod_type": "p1.x1",
               "pods": 1
            }
         },
         "deletion_protection": "disabled"
      }'
```

## Create a pod index from a collection

You can create a pod-based index from a collection. For more details, see [Restore an index](https://docs.pinecone.io/guides/legacy/pod-based-indexes/restore-a-pod-based-index.md).
