from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
index_model = pc.create_index_for_model(
name="docs-example",
cloud="aws",
region="us-east-1",
embed={
"model": "multilingual-e5-large",
"field_map": {"text": "chunk_text"}
}
)
PINECONE_API_KEY="YOUR_API_KEY"
curl "https://api.pinecone.io/indexes/create-for-model" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "docs-example",
"cloud": "aws",
"region": "us-east-1",
"embed": {
"model": "multilingual-e5-large",
"field_map": {"text": "chunk_text"}
}
}'
{
"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": {
"embedding": {
"dimension": 1536,
"metric": "cosine",
"type": "dense_vector"
},
"title": {
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"type": "string"
}
}
},
"status": {
"ready": true,
"state": "Ready"
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Bad request. The request body included invalid request parameters."
},
"status": 400
}"Invalid API key"{
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Request failed. Pay all past due invoices to lift restrictions on your account."
},
"status": 402
}{
"error": {
"code": "FORBIDDEN",
"message": "Increase your quota or upgrade to create more indexes."
},
"status": 403
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource cloud: aws region: us-west1 not found."
},
"status": 404
}{
"error": {
"code": "ALREADY_EXISTS",
"message": "Resource already exists."
},
"status": 409
}{
"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
}{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}Create an index with integrated embedding
Create an index with integrated embedding.
With this type of index, you provide source text, and Pinecone uses a hosted embedding model to convert the text automatically during upsert and search.
The response is this version’s index model, with the embedding configuration surfaced as a semantic_text field in the index schema, named after the field_map text entry. Read and write the index through the records API.
For guidance and examples, see Create an index.
from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
index_model = pc.create_index_for_model(
name="docs-example",
cloud="aws",
region="us-east-1",
embed={
"model": "multilingual-e5-large",
"field_map": {"text": "chunk_text"}
}
)
PINECONE_API_KEY="YOUR_API_KEY"
curl "https://api.pinecone.io/indexes/create-for-model" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "docs-example",
"cloud": "aws",
"region": "us-east-1",
"embed": {
"model": "multilingual-e5-large",
"field_map": {"text": "chunk_text"}
}
}'
{
"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": {
"embedding": {
"dimension": 1536,
"metric": "cosine",
"type": "dense_vector"
},
"title": {
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"type": "string"
}
}
},
"status": {
"ready": true,
"state": "Ready"
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Bad request. The request body included invalid request parameters."
},
"status": 400
}"Invalid API key"{
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Request failed. Pay all past due invoices to lift restrictions on your account."
},
"status": 402
}{
"error": {
"code": "FORBIDDEN",
"message": "Increase your quota or upgrade to create more indexes."
},
"status": 403
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource cloud: aws region: us-west1 not found."
},
"status": 404
}{
"error": {
"code": "ALREADY_EXISTS",
"message": "Resource already exists."
},
"status": 409
}{
"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
}{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
index_model = pc.create_index_for_model(
name="docs-example",
cloud="aws",
region="us-east-1",
embed={
"model": "multilingual-e5-large",
"field_map": {"text": "chunk_text"}
}
)
PINECONE_API_KEY="YOUR_API_KEY"
curl "https://api.pinecone.io/indexes/create-for-model" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "docs-example",
"cloud": "aws",
"region": "us-east-1",
"embed": {
"model": "multilingual-e5-large",
"field_map": {"text": "chunk_text"}
}
}'
Authorizations
Headers
Required date-based version header
Body
The desired configuration for the index and associated embedding model.
The desired configuration for the index and associated embedding model.
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 public cloud where you would like your index hosted.
Possible values: gcp, aws, or azure.
"aws"
The region where you would like your index to be created.
"us-east-1"
Specify the integrated inference embedding configuration for the index.
Once set the model cannot be changed, but you can later update the embedding configuration for an integrated inference index including field map, read parameters, or write parameters.
Refer to the model guide for available models and model details.
Show child attributes
Show child attributes
{
"field_map": { "text": "your-text-field" },
"metric": "cosine",
"model": "multilingual-e5-large",
"read_parameters": { "input_type": "query", "truncate": "NONE" },
"write_parameters": { "input_type": "passage" }
}
Whether deletion protection is enabled/disabled for the index.
Possible values: disabled or enabled.
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" }
Schema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when schema is present, only fields which are present in the fields object with a filterable: true are indexed. Note that filterable: false is not currently supported.
Show child attributes
Show child attributes
{
"fields": {
"description": { "filterable": true },
"genre": { "filterable": true },
"year": { "filterable": true }
}
}
By default the index will be created with read capacity mode OnDemand. If you prefer to allocate dedicated read nodes for your workload, you must specify mode Dedicated and additional configurations for node_type and scaling. BYOC indexes do not support OnDemand: a byoc deployment must set mode: Dedicated explicitly, since omitting read_capacity defaults to OnDemand and is rejected.
- On-demand
- Dedicated
Show child attributes
Show child attributes
{ "mode": "OnDemand" }
Response
The index has successfully been created for the embedding model.
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 thatrequire predictable performance.
-
managed: Serverless infrastructure managed by Pinecone, includingfull-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, semantic text fields, and metadata fields.
Show child attributes
Show child attributes
{
"fields": {
"embedding": {
"dimension": 1536,
"metric": "cosine",
"type": "dense_vector"
},
"title": {
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"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?