---
title: "Create an index with integrated embedding"
method: POST
path: "/indexes/create-for-model"
tags: ["Manage Indexes"]
---

# Create an index with integrated embedding

`POST /indexes/create-for-model`

Create an index with integrated embedding.
With this type of index, you provide source text, and  Pinecone uses a [hosted embedding model](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models)  to convert the text automatically during [upsert](https://docs.pinecone.io/reference/api/2026-04/data-plane/upsert_records)  and [search](https://docs.pinecone.io/reference/api/2026-04/data-plane/search_records).  
For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index#integrated-embedding).

## Headers

- `X-Pinecone-Api-Version` string, required

## Request body

- DbControlCreateIndexForModelRequest — The desired configuration for the index and associated embedding model.
  - `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 '-'.
  - `cloud` string, required — The public cloud where you would like your index hosted. Possible values: `gcp`, `aws`, or `azure`.
  - `region` string, required — The region where you would like your index to be created.
  - `deletion_protection` string — Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`.
  - `tags` DbControlIndexTags — 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.
  - `schema` DbControlMetadataSchema — 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.
    - `fields` object, required — A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique.
  - `read_capacity` union — 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`.
    - DbControlReadCapacityOnDemandSpec
      - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
    - DbControlReadCapacityDedicatedSpec
      - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
      - `dedicated` DbControlReadCapacityDedicatedConfig, required — Configuration for dedicated read capacity. See [this guide](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) for more details on how to configure dedicated read capacity.
        - `node_type` string — The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory.
        - `scaling` string — The type of scaling strategy to use.
        - `manual` DbControlScalingConfigManual — The config to use for manual read capacity scaling.
          - `replicas` integer — The number of replicas to use. Replicas duplicate the compute resources and data of an index, allowing higher query throughput and availability. Setting replicas to 0 disables the index but can be used to reduce costs while usage is paused.
          - `shards` integer — The number of shards to use. Shards determine the storage capacity of an index, with each shard providing 250 GB of storage.
  - `embed` object, required — 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](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) for available models and model details.
    - `model` string, required — The name of the embedding model to use for the index.
    - `metric` string — The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. Possible values: `cosine`, `euclidean`, or `dotproduct`.
    - `field_map` object, required — Identifies the name of the text field from your document model that will be embedded.
    - `dimension` integer — The dimension of embedding vectors produced for the index.
    - `read_parameters` object — The read parameters for the embedding model.
    - `write_parameters` object — The write parameters for the embedding model.

## Response `201`

The index has successfully been created for the embedding model.

- DbControlIndexModel — 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 '-'.
  - `dimension` integer — The dimensions of the vectors to be inserted in the index.
  - `metric` string, 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`.
  - `host` string, required — The URL address where the index is hosted.
  - `private_host` string — The private endpoint URL of an index.
  - `deletion_protection` string — Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`.
  - `tags` DbControlIndexTags — 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.
  - `embed` DbControlModelIndexEmbed — The embedding model and document fields mapped to embedding inputs.
    - `model` string, required — The name of the embedding model used to create the index.
    - `metric` string — The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. Possible values: `cosine`, `euclidean`, or `dotproduct`.
    - `dimension` integer — The dimensions of the vectors to be inserted in the index.
    - `vector_type` string — 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.
    - `field_map` object — Identifies the name of the text field from your document model that is embedded.
    - `read_parameters` object — The read parameters for the embedding model.
    - `write_parameters` object — The write parameters for the embedding model.
  - `spec` union, required — The spec object defines how the index should be deployed.
    - object
      - `serverless` DbControlServerlessSpecResponse, required — Configuration of a serverless index.
        - `cloud` string, required — The public cloud where you would like your index hosted. Possible values: `gcp`, `aws`, or `azure`.
        - `region` string, required — The region where you would like your index to be created.
        - `read_capacity` union, required — Response containing read capacity configuration
          - DbControlReadCapacityOnDemandSpecResponse
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
            - `status` DbControlReadCapacityStatus, required — The current status of factors affecting the read capacity of a serverless index
              - …
          - DbControlReadCapacityDedicatedSpecResponse
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
            - `dedicated` DbControlReadCapacityDedicatedConfig, required — Configuration for dedicated read capacity. See [this guide](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) for more details on how to configure dedicated read capacity.
              - …
            - `status` DbControlReadCapacityStatus, required — The current status of factors affecting the read capacity of a serverless index
              - …
        - `source_collection` string — The name of the collection to be used as the source for the index.
        - `schema` DbControlMetadataSchema — 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.
          - `fields` object, required — A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique.
    - object
      - `pod` DbControlPodSpec, required — Configuration needed to deploy a pod-based index.
        - `environment` string, required — The environment where the index is hosted.
        - `replicas` integer — The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
        - `shards` integer — The number of shards. Shards split your data across multiple pods so you can fit more data into an index.
        - `pod_type` string, required — The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`.
        - `pods` integer — The number of pods to be used in the index. This should be equal to `shards` x `replicas`.'
        - `metadata_config` object — Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `metadata_config` is present, only specified metadata fields are indexed. These configurations are only valid for use with pod-based indexes.
          - `indexed` string[] — By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields that should be indexed.
        - `source_collection` string — The name of the collection to be used as the source for the index.
    - object
      - `byoc` DbControlByocSpecResponse, required — Configuration of a BYOC index.
        - `environment` string, required — The environment where the index is hosted.
        - `read_capacity` union, required — Response containing read capacity configuration
          - DbControlReadCapacityOnDemandSpecResponse
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
            - `status` DbControlReadCapacityStatus, required — The current status of factors affecting the read capacity of a serverless index
              - …
          - DbControlReadCapacityDedicatedSpecResponse
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
            - `dedicated` DbControlReadCapacityDedicatedConfig, required — Configuration for dedicated read capacity. See [this guide](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) for more details on how to configure dedicated read capacity.
              - …
            - `status` DbControlReadCapacityStatus, required — The current status of factors affecting the read capacity of a serverless index
              - …
        - `schema` DbControlMetadataSchema — 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.
          - `fields` object, required — A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique.
  - `status` object, required — The current status of the index
    - `ready` boolean, required — Whether the index is ready for use
    - `state` string, required — The state of the index. Possible values: `Initializing`, `InitializationFailed`, `ScalingUp`, `ScalingDown`, `ScalingUpPodSize`, `ScalingDownPodSize`, `Terminating`, `Ready`, or `Disabled`.
  - `vector_type` string, 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.

## Other responses

- `400` — Bad request. The request body included invalid request parameters.
- `401` — Unauthorized. Possible causes: Invalid API key.
- `404` — Unknown cloud or region when creating a serverless index.
- `409` — Index of given name already exists.
- `422` — Unprocessable entity. The request body could not be deserialized.
- `500` — Internal server error.

---

[API](https://skmtc.net/pinecone/apis/pinecone-api.md) · [All operations](https://skmtc.net/pinecone/apis/pinecone-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pinecone/pinecone-api/versions/35876583485d/schema)
