v1

latestOpenAPI 3.0.3Apache 2.02026-07-2685172326.0 KB
Manage Indexes

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.
For guidance and examples, see Create an index.

post/indexes/create-for-model

Headers

X-Pinecone-Api-Versionstring required

Required date-based version header

Request body

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

cloudstring required

The public cloud where you would like your index hosted. Possible values: gcp, aws, or azure.

regionstring required

The region where you would like your index to be created.

deletion_protectionstring

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

tagsIndexTags

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 request

{
  "name": "example-index",
  "cloud": "aws",
  "region": "us-east-1",
  "tags": {
    "tag0": "val0",
    "tag1": "val1"
  },
  "schema": {
    "fields": {
      "description": {
        "filterable": true
      },
      "genre": {
        "filterable": true
      },
      "year": {
        "filterable": true
      }
    }
  },
  "read_capacity": {
    "mode": "OnDemand"
  },
  "embed": {
    "field_map": {
      "text": "your-text-field"
    },
    "metric": "cosine",
    "model": "multilingual-e5-large",
    "read_parameters": {
      "input_type": "query",
      "truncate": "NONE"
    },
    "write_parameters": {
      "input_type": "passage"
    }
  }
}

Response

The index has successfully been created for the embedding model.

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

dimensioninteger

The dimensions of the vectors to be inserted in the index.

metricstring required

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.

hoststring required

The URL address where the index is hosted.

private_hoststring

The private endpoint URL of an index.

deletion_protectionstring

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

tagsIndexTags

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.

vector_typestring required

The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified.

Example response

{
  "name": "example-index",
  "dimension": 1536,
  "host": "semantic-search-c01b5b5.svc.us-west1-gcp.pinecone.io",
  "private_host": "semantic-search-c01b5b5.svc.private.us-west1-gcp.pinecone.io",
  "tags": {
    "tag0": "val0",
    "tag1": "val1"
  },
  "embed": {
    "field_map": {
      "text": "your-text-field"
    },
    "metric": "cosine",
    "model": "multilingual-e5-large",
    "read_parameters": {
      "input_type": "query",
      "truncate": "NONE"
    },
    "write_parameters": {
      "input_type": "passage"
    }
  },
  "spec": {
    "serverless": {
      "cloud": "aws",
      "region": "us-east-1",
      "read_capacity": {
        "mode": "OnDemand",
        "status": {
          "state": "Ready"
        }
      },
      "source_collection": "movie-embeddings",
      "schema": {
        "fields": {
          "description": {
            "filterable": true
          },
          "genre": {
            "filterable": true
          },
          "year": {
            "filterable": true
          }
        }
      }
    }
  },
  "status": {
    "ready": true,
    "state": "ScalingUpPodSize"
  }
}