Skip to main content
POST
/
indexes
/
create-for-model
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"}
    }
)

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.

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"}
    }
)

Authorizations

Api-Key
string
header
required

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

Headers

X-Pinecone-Api-Version
string
default:202601-alpha
required

Required date-based version header

Body

application/json

The desired configuration for the index and associated embedding model.

Configuration for creating an index with an integrated embedding model. The server constructs a semantic_text schema field named field using the provided model parameters.

field
string
required

The name of the schema field that will hold the embedded text. This becomes a semantic_text field in the index schema.

Example:

"content"

model
string
required

The name of the embedding model to use. Refer to the model guide for available models and details.

Example:

"multilingual-e5-large"

name
string

The name of the index. Auto-generated if not provided. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. Callers that require retry-safe behavior should provide an explicit name — a duplicate request with the same name returns 409, making success detectable on retry.

Required string length: 1 - 45
Example:

"example-index"

deployment
Serverless · object

Deployment configuration for a serverless (managed) index. Serverless indexes scale automatically and you are billed only for the resources you use. This deployment type also covers full-text search indexes, which are serverless under the hood.

Example:
{
"cloud": "aws",
"deployment_type": "managed",
"region": "us-east-1"
}
metric
string

The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the vector_type is dense, the metric defaults to 'cosine'. Possible values: cosine, euclidean, or dotproduct.

write_parameters
object

Model-specific parameters applied when embedding documents at write time.

Example:
{ "input_type": "passage" }
read_parameters
object

Model-specific parameters applied when embedding queries at read time.

Example:
{ "input_type": "query", "truncate": "NONE" }
read_capacity
On-demand · object

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.

Example:
{ "mode": "OnDemand" }
tags
object

Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '', or '-'. Values must be alphanumeric, ';', '@', '', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string.

Example:
{ "tag0": "val0", "tag1": "val1" }
deletion_protection
string
default:disabled

Whether deletion protection is enabled/disabled for the index. Possible values: disabled or enabled.

Response

The index has been successfully created.

The IndexModel describes the configuration and status of a Pinecone index.

name
string
required

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 '-'.

Required string length: 1 - 45
Example:

"example-index"

host
string
required

The URL address where the index is hosted.

Example:

"semantic-search-c01b5b5.svc.us-west1-gcp.pinecone.io"

status
object
required

The current status of the index.

Example:
{ "ready": true, "state": "Ready" }
deployment
Pod-based · object
required

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.

Example:
{
"deployment_type": "pod",
"environment": "us-east1-gcp",
"pod_type": "p1.x1",
"replicas": 1,
"shards": 1
}
schema
object
required

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.

Example:
{
"fields": {
"embedding": {
"dimension": 1536,
"metric": "cosine",
"type": "dense_vector"
},
"title": {
"full_text_search": { "language": "en" },
"type": "string"
}
}
}
deletion_protection
string
default:disabled
required

Whether deletion protection is enabled/disabled for the index. Possible values: disabled or enabled.

private_host
string

The private endpoint URL of an index.

Example:

"semantic-search-c01b5b5.svc.private.us-west1-gcp.pinecone.io"

read_capacity
On-demand · object

Response containing read capacity configuration

Example:
{
"mode": "OnDemand",
"status": { "state": "Ready" }
}
source_collection
string

The name of the collection this index was created from, if any.

Example:

"movie-embeddings"

source_backup_id
string

The ID of the backup this index was restored from, if any.

Example:

"670e8400-e29b-41d4-a716-446655440000"

cmek_id
string

The ID of the customer-managed encryption key (CMEK) used to encrypt this index, if any.

Example:

"arn:aws:kms:us-east-1:123456789012:key/mrk-abc123"

tags
object

Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '', or '-'. Values must be alphanumeric, ';', '@', '', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string.

Example:
{ "tag0": "val0", "tag1": "val1" }