Create an index
Create a Pinecone index. Define the schema for your index — dense vector, sparse vector, and full-text search fields — and, optionally, the deployment infrastructure (managed serverless or BYOC). To create an index with an integrated embedding model, use Create an index with integrated embedding.
The index schema cannot be modified after creation. Field types, dimensions, metrics, and text-analysis settings are permanent. Choose your schema carefully before creating an index.
To create an index from a backup, use Create index from backup.
For guidance and examples, see Create an index.
Creates a new schema-defined index. The schema declares each field and its type — dense vector, sparse vector, or full-text search. The index initializes asynchronously; poll GET /indexes/{index_name} until status.ready: true (and, for Dedicated read capacity, read_capacity.status.state: "Ready") before performing data plane operations.
Cloud regions
Section titled “Cloud regions”For managed (serverless) indexes, the cloud and region fields in deployment accept the following values:
| Cloud | Region | Supported plans | Availability phase |
|---|---|---|---|
aws |
us-east-1 (Virginia) |
Starter, Builder, Standard, Enterprise | General availability |
aws |
us-west-2 (Oregon) |
Builder, Standard, Enterprise | General availability |
aws |
eu-west-1 (Ireland) |
Builder, Standard, Enterprise | General availability |
aws |
eu-central-1 (Frankfurt) |
Builder, Standard, Enterprise | General availability |
aws |
ap-southeast-1 (Singapore) |
Builder, Standard, Enterprise | General availability |
gcp |
us-central1 (Iowa) |
Builder, Standard, Enterprise | General availability |
gcp |
europe-west4 (Netherlands) |
Builder, Standard, Enterprise | General availability |
azure |
eastus2 (Virginia) |
Builder, Standard, Enterprise | General availability |
The cloud and region can't be changed after a serverless index is created.
For BYOC indexes, set deployment.environment to the environment ID provisioned for your account instead. See Bring Your Own Cloud for details.
# pip install --upgrade pinecone
import os
from pinecone import Pinecone, SchemaBuilder
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
schema = (
SchemaBuilder()
.add_string_field(name="title", full_text_search={})
.add_string_field(name="body", full_text_search={"language": "en", "stemming": True, "stop_words": True})
.build()
)
index_model = pc.indexes.create(
name="articles",
schema=schema,
read_capacity={"mode": "OnDemand"},
)
host = index_model.hostPINECONE_API_KEY="YOUR_API_KEY"
# EXAMPLE REQUEST 1: On-demand read capacity (default)
curl "https://api.pinecone.io/indexes" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "articles",
"deployment": {
"deployment_type": "managed",
"cloud": "aws",
"region": "us-east-1"
},
"schema": {
"fields": {
"title": {
"type": "string",
"full_text_search": {}
},
"body": {
"type": "string",
"full_text_search": {}
}
}
},
"read_capacity": { "mode": "OnDemand" },
"deletion_protection": "disabled"
}'
# EXAMPLE REQUEST 2: Dedicated read capacity
curl "https://api.pinecone.io/indexes" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "articles-dedicated",
"deployment": {
"deployment_type": "managed",
"cloud": "aws",
"region": "us-east-1"
},
"schema": {
"fields": {
"content": {
"type": "string",
"full_text_search": {}
}
}
},
"read_capacity": {
"mode": "Dedicated",
"dedicated": {
"node_type": "b1",
"scaling": "Manual",
"manual": { "shards": 1, "replicas": 1 }
}
},
"deletion_protection": "disabled"
}'
# EXAMPLE REQUEST 3: Multi-field schema (text + dense + sparse ranking fields)
curl "https://api.pinecone.io/indexes" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "articles-multifield",
"deployment": {
"deployment_type": "managed",
"cloud": "aws",
"region": "us-east-1"
},
"schema": {
"fields": {
"title": { "type": "string", "full_text_search": {} },
"body": { "type": "string", "full_text_search": { "language": "en", "stemming": true, "stop_words": true } },
"embedding": { "type": "dense_vector", "dimension": 1536, "metric": "cosine" },
"sparse_embedding": { "type": "sparse_vector" }
}
}
}'
# EXAMPLE REQUEST 4: Classic vector index — reserved `_values` field, served by the Vectors API.
curl "https://api.pinecone.io/indexes" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "classic-index",
"schema": {
"fields": {
"_values": { "type": "dense_vector", "dimension": 1536, "metric": "cosine" }
}
}
}'
# EXAMPLE REQUEST 5: Bring-your-own-cloud (BYOC) deployment.
# BYOC indexes require Dedicated read capacity — OnDemand is rejected.
curl "https://api.pinecone.io/indexes" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "byoc-index",
"deployment": {
"deployment_type": "byoc",
"environment": "aws-us-east-1-b921"
},
"read_capacity": {
"mode": "Dedicated",
"dedicated": {
"node_type": "b1",
"scaling": "Manual",
"manual": { "shards": 1, "replicas": 1 }
}
},
"schema": {
"fields": {
"embedding": { "type": "dense_vector", "dimension": 1536, "metric": "cosine" }
}
}
}'POST /indexes
Parameters
Section titled “Parameters”X-Pinecone-Api-Version(header, string, required) — Required date-based version header
Request body
Section titled “Request body”name(body, string) — The name of the index. Must be unique within the project, start and end with an alphanumeric character, and contain only lower case alphanumeric characters or '-'. Generated automatically if not provided.deployment(body, object) — The deployment configuration for index creation. Thedeployment_typefield selects the infrastructure model. Defaults tomanaged(serverless) inus-east-1onawsif omitted. -managed: Serverless infrastructure managed by Pinecone, including full-text search indexes. -byoc: Bring-your-own-compute.schema(body, object, required) — The schema to use when creating a Pinecone index. Defines the fields the index searches over: dense vector, sparse vector, and full-text search fields. At least one ofdense_vector,sparse_vector, or astringfield withfull_text_searchmust be present; an emptyfieldsmap is rejected. At most onedense_vectorand onesparse_vectorfield, and at most 100full_text_searchfields. Mecmek_id(body, string) — The ID of a customer-managed encryption key (CMEK) to use for this index. Requires CMEK to be enabled for your organization. Encrypted indexes cannot havefull_text_searchfields: a request that setscmek_idand declares one is rejected, and a project that enforces CMEK rejects any schema with afull_text_searchfield with412.read_capacity(body, object) — By default the index will be created with read capacity modeOnDemand. If you prefer to allocate dedicated read nodes for your workload, you must specify modeDedicatedand additional configurations fornode_typeandscaling. BYOC indexes do not supportOnDemand: abyocdeployment must setmode: Dedicatedexplicitly, since omittingread_capacitydefaults toOnDemandand is rejecttags(body, object) — 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.nullin responses when the index has no tags.deletion_protection(body, string) — Whether deletion protection is enabled/disabled for the index. Possible values:disabledorenabled.
Responses
Section titled “Responses”201— The index has been successfully created.400— Bad request. The request body included invalid request parameters.401— Unauthorized. Possible causes: missing or invalid API key.402— Payment required. Organization is on a paid plan and is delinquent on payment.403— Forbidden. Possible causes: the project's index quota is exhausted, dedicated read capacity is not enabled for the organization, or (when configuring) the index's read capacity is not yetReady.404— Unknown cloud or region when creating a serverless index.409— Index of given name already exists.412— The project's encryption settings do not allow this index.422— Unprocessable entity. The request body could not be deserialized.500— Internal server error.