# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
# Enable deletion protection
pc.indexes.configure(
name="articles",
deletion_protection="enabled",
)
# Convert read capacity from OnDemand to Dedicated
pc.indexes.configure(
name="articles",
read_capacity={
"mode": "Dedicated",
"dedicated": {
"node_type": "b1",
"scaling": "Manual",
"manual": {"shards": 1, "replicas": 1},
},
},
)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
// Enable deletion protection
await pc.indexes.configure('articles', {
deletionProtection: 'enabled',
});
// Convert read capacity from OnDemand to Dedicated
await pc.indexes.configure('articles', {
readCapacity: {
mode: 'Dedicated',
dedicated: {
nodeType: 'b1',
scaling: 'Manual',
manual: { shards: 1, replicas: 1 },
},
},
});
package main
import (
"context"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v7/pinecone"
)
func main() {
ctx := context.Background()
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey: os.Getenv("PINECONE_API_KEY"),
})
if err != nil {
log.Fatalf("Failed to create Client: %v", err)
}
// Enable deletion protection
_, err = pc.ConfigureIndex(ctx, "articles", pinecone.ConfigureIndexParams{
DeletionProtection: pinecone.DeletionProtectionEnabled,
})
if err != nil {
log.Fatalf("Failed to configure index: %v", err)
}
// Convert read capacity from OnDemand to Dedicated
nodeType := "b1"
shards := int32(1)
replicas := int32(1)
_, err = pc.ConfigureIndex(ctx, "articles", pinecone.ConfigureIndexParams{
ReadCapacity: &pinecone.ReadCapacityParams{
Dedicated: &pinecone.ReadCapacityDedicatedConfig{
NodeType: &nodeType,
Scaling: &pinecone.ReadCapacityScaling{
Manual: &pinecone.ReadCapacityManualScaling{
Shards: &shards,
Replicas: &replicas,
},
},
},
},
})
if err != nil {
log.Fatalf("Failed to configure index: %v", err)
}
}
PINECONE_API_KEY="YOUR_API_KEY"
# Enable deletion protection
curl -X PATCH "https://api.pinecone.io/indexes/articles" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{ "deletion_protection": "enabled" }'
# Convert read capacity from OnDemand to Dedicated
curl -X PATCH "https://api.pinecone.io/indexes/articles" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"read_capacity": {
"mode": "Dedicated",
"dedicated": {
"node_type": "b1",
"scaling": "Manual",
"manual": { "shards": 1, "replicas": 1 }
}
}
}'
{
"deletion_protection": "disabled",
"deployment": {
"cloud": "aws",
"deployment_type": "managed",
"region": "us-east-1"
},
"host": "my-index-abc123.svc.pinecone.io",
"name": "my-index",
"read_capacity": {
"mode": "OnDemand",
"status": {
"state": "Ready"
}
},
"schema": {
"fields": {
"title": {
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"store_text": true,
"type": "string"
},
"your_vector": {
"dimension": 1536,
"metric": "cosine",
"type": "dense_vector"
}
}
},
"status": {
"ready": true,
"state": "Ready"
}
}Configure an index
Configure an existing index. For guidance and examples, see Manage indexes.
# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
# Enable deletion protection
pc.indexes.configure(
name="articles",
deletion_protection="enabled",
)
# Convert read capacity from OnDemand to Dedicated
pc.indexes.configure(
name="articles",
read_capacity={
"mode": "Dedicated",
"dedicated": {
"node_type": "b1",
"scaling": "Manual",
"manual": {"shards": 1, "replicas": 1},
},
},
)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
// Enable deletion protection
await pc.indexes.configure('articles', {
deletionProtection: 'enabled',
});
// Convert read capacity from OnDemand to Dedicated
await pc.indexes.configure('articles', {
readCapacity: {
mode: 'Dedicated',
dedicated: {
nodeType: 'b1',
scaling: 'Manual',
manual: { shards: 1, replicas: 1 },
},
},
});
package main
import (
"context"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v7/pinecone"
)
func main() {
ctx := context.Background()
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey: os.Getenv("PINECONE_API_KEY"),
})
if err != nil {
log.Fatalf("Failed to create Client: %v", err)
}
// Enable deletion protection
_, err = pc.ConfigureIndex(ctx, "articles", pinecone.ConfigureIndexParams{
DeletionProtection: pinecone.DeletionProtectionEnabled,
})
if err != nil {
log.Fatalf("Failed to configure index: %v", err)
}
// Convert read capacity from OnDemand to Dedicated
nodeType := "b1"
shards := int32(1)
replicas := int32(1)
_, err = pc.ConfigureIndex(ctx, "articles", pinecone.ConfigureIndexParams{
ReadCapacity: &pinecone.ReadCapacityParams{
Dedicated: &pinecone.ReadCapacityDedicatedConfig{
NodeType: &nodeType,
Scaling: &pinecone.ReadCapacityScaling{
Manual: &pinecone.ReadCapacityManualScaling{
Shards: &shards,
Replicas: &replicas,
},
},
},
},
})
if err != nil {
log.Fatalf("Failed to configure index: %v", err)
}
}
PINECONE_API_KEY="YOUR_API_KEY"
# Enable deletion protection
curl -X PATCH "https://api.pinecone.io/indexes/articles" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{ "deletion_protection": "enabled" }'
# Convert read capacity from OnDemand to Dedicated
curl -X PATCH "https://api.pinecone.io/indexes/articles" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"read_capacity": {
"mode": "Dedicated",
"dedicated": {
"node_type": "b1",
"scaling": "Manual",
"manual": { "shards": 1, "replicas": 1 }
}
}
}'
{
"deletion_protection": "disabled",
"deployment": {
"cloud": "aws",
"deployment_type": "managed",
"region": "us-east-1"
},
"host": "my-index-abc123.svc.pinecone.io",
"name": "my-index",
"read_capacity": {
"mode": "OnDemand",
"status": {
"state": "Ready"
}
},
"schema": {
"fields": {
"title": {
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"store_text": true,
"type": "string"
},
"your_vector": {
"dimension": 1536,
"metric": "cosine",
"type": "dense_vector"
}
}
},
"status": {
"ready": true,
"state": "Ready"
}
}deletion_protection, tags, and read_capacity (for example, converting from OnDemand to Dedicated). The schema itself is immutable — to change field types or add new indexed fields, create a new index and re-upsert.
This is a partial update: only the fields you include in the request body are modified. Unspecified fields are left unchanged. To clear tags, send "tags": {}.
# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
# Enable deletion protection
pc.indexes.configure(
name="articles",
deletion_protection="enabled",
)
# Convert read capacity from OnDemand to Dedicated
pc.indexes.configure(
name="articles",
read_capacity={
"mode": "Dedicated",
"dedicated": {
"node_type": "b1",
"scaling": "Manual",
"manual": {"shards": 1, "replicas": 1},
},
},
)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
// Enable deletion protection
await pc.indexes.configure('articles', {
deletionProtection: 'enabled',
});
// Convert read capacity from OnDemand to Dedicated
await pc.indexes.configure('articles', {
readCapacity: {
mode: 'Dedicated',
dedicated: {
nodeType: 'b1',
scaling: 'Manual',
manual: { shards: 1, replicas: 1 },
},
},
});
package main
import (
"context"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v7/pinecone"
)
func main() {
ctx := context.Background()
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey: os.Getenv("PINECONE_API_KEY"),
})
if err != nil {
log.Fatalf("Failed to create Client: %v", err)
}
// Enable deletion protection
_, err = pc.ConfigureIndex(ctx, "articles", pinecone.ConfigureIndexParams{
DeletionProtection: pinecone.DeletionProtectionEnabled,
})
if err != nil {
log.Fatalf("Failed to configure index: %v", err)
}
// Convert read capacity from OnDemand to Dedicated
nodeType := "b1"
shards := int32(1)
replicas := int32(1)
_, err = pc.ConfigureIndex(ctx, "articles", pinecone.ConfigureIndexParams{
ReadCapacity: &pinecone.ReadCapacityParams{
Dedicated: &pinecone.ReadCapacityDedicatedConfig{
NodeType: &nodeType,
Scaling: &pinecone.ReadCapacityScaling{
Manual: &pinecone.ReadCapacityManualScaling{
Shards: &shards,
Replicas: &replicas,
},
},
},
},
})
if err != nil {
log.Fatalf("Failed to configure index: %v", err)
}
}
PINECONE_API_KEY="YOUR_API_KEY"
# Enable deletion protection
curl -X PATCH "https://api.pinecone.io/indexes/articles" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{ "deletion_protection": "enabled" }'
# Convert read capacity from OnDemand to Dedicated
curl -X PATCH "https://api.pinecone.io/indexes/articles" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"read_capacity": {
"mode": "Dedicated",
"dedicated": {
"node_type": "b1",
"scaling": "Manual",
"manual": { "shards": 1, "replicas": 1 }
}
}
}'
Authorizations
Headers
Required date-based version header
Path Parameters
The name of the index to configure.
Body
Configuration updates to apply to an existing index. All fields are optional; only the fields you include are modified.
deployment: Update pod-based scaling parameters (replicas,pod_type). Deployment type and cloud/region cannot be changed.schema: Updatesemantic_textfield embedding parameters, on a legacy integrated index created via create-for-model. Onlywrite_parametersandread_parametersmay be changed; the model cannot be changed after creation.read_capacity: Update read capacity mode or dedicated node configuration for managed and BYOC indexes. Not applicable to pod-based indexes.tags: Update or delete index tags. Setting a tag value to""removes the tag.deletion_protection: Enable or disable deletion protection.
Deployment update parameters for pod-based indexes. Specify replicas, pod_type, or both. Deployment type, cloud/region, and environment cannot be changed after creation. Do not include a deployment_type field; it is not accepted.
Show child attributes
Show child attributes
{ "replicas": 4 }
Schema updates to apply to an existing index. Only semantic_text field parameters, on a legacy integrated index created via create-for-model, can be updated after index creation. The model itself cannot be changed once set; only write_parameters and read_parameters may be updated if the model stays the same. The embed and sparse_embed configurations of a string field are fixed at creation and cannot be updated.
Show child attributes
Show child attributes
{
"fields": {
"content": {
"read_parameters": { "input_type": "query", "truncate": "NONE" },
"type": "semantic_text",
"write_parameters": { "input_type": "passage" }
}
}
}
Read capacity changes for an existing managed or BYOC index. Switch to OnDemand, or set Dedicated and change any subset of node_type, scaling, and manual replicas/shards; fields you omit keep their current value. BYOC indexes do not support OnDemand.
- On-demand
- Dedicated
Show child attributes
Show child attributes
{ "mode": "OnDemand" }
Custom user tags added to an index, at most 20 per index. Keys must be 80 characters or less and alphanumeric, '_', or '-'. Values must be 120 characters or less and consist of printable ASCII characters or spaces. To unset a key, set the value to be an empty string. null in responses when the index has no tags.
Show child attributes
Show child attributes
{ "tag0": "val0", "tag1": "val1" }
Whether deletion protection is enabled/disabled for the index.
Possible values: disabled or enabled.
Response
The configuration change was recorded and the updated index is returned. Changes that resize the index (replicas, shards, read capacity) are applied asynchronously; poll the index status to see when they take effect.
The IndexModel describes the configuration and status of a Pinecone index.
The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
1 - 45"example-index"
The URL address where the index is hosted.
"semantic-search-c01b5b5.svc.us-west1-gcp.pinecone.io"
The current status of the index.
Show child attributes
Show child attributes
{ "ready": true, "state": "Ready" }
The deployment configuration of a Pinecone index. The deployment_type field indicates which infrastructure model the index uses.
pod: Dedicated pod-based infrastructure. Suitable for workloads that require predictable performance.managed: Serverless infrastructure managed by Pinecone, including full-text search indexes. Scales automatically; billed per usage.byoc: Bring-your-own-compute. Runs in customer-managed infrastructure.
- Pod-based
- Serverless
- BYOC
Show child attributes
Show child attributes
{
"deployment_type": "pod",
"environment": "us-east1-gcp",
"pod_type": "p1.x1",
"replicas": 1,
"shards": 1
}
The schema of a Pinecone index. The schema defines the typed fields that documents in the index can contain, including vector fields, string fields searched by full-text search or by embeddings, and metadata fields.
Show child attributes
Show child attributes
{
"fields": {
"body": {
"embed": {
"dimension": 1024,
"metric": "cosine",
"model": "llama-text-embed-v2"
},
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"sparse_embed": { "model": "pinecone-sparse-english-v0" },
"store_text": true,
"type": "string"
},
"title": {
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"store_text": true,
"type": "string"
}
}
}
Whether deletion protection is enabled/disabled for the index.
Possible values: disabled or enabled.
The private endpoint URL of an index.
"semantic-search-c01b5b5.svc.private.us-west1-gcp.pinecone.io"
Response containing read capacity configuration
- On-demand
- Dedicated
Show child attributes
Show child attributes
{
"mode": "OnDemand",
"status": { "state": "Ready" }
}
The name of the collection this index was created from, if any.
"movie-embeddings"
The ID of the backup this index was restored from, if any.
"670e8400-e29b-41d4-a716-446655440000"
The ID of the customer-managed encryption key (CMEK) used to encrypt this index, if any.
"arn:aws:kms:us-east-1:123456789012:key/mrk-abc123"
Custom user tags added to an index, at most 20 per index. Keys must be 80 characters or less and alphanumeric, '_', or '-'. Values must be 120 characters or less and consist of printable ASCII characters or spaces. To unset a key, set the value to be an empty string. null in responses when the index has no tags.
Show child attributes
Show child attributes
{ "tag0": "val0", "tag1": "val1" }
Was this page helpful?