# Create an index with integrated embedding

With this type of index, you provide source text, and Pinecone uses a [hosted embedding model](/guides/index-data-create-an-index#embedding-models) to convert the text automatically during [upsert](/guides/database-data-plane-upsert-records) and [search](/guides/database-data-plane-search-records).

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](/guides/index-data-create-an-index#integrated-embedding).

:::code-group
```python Python
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"}
    }
)
```

```shell curl
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"}
    }
  }'
```
:::

`POST /indexes/create-for-model`

:::code-group
```json title="201"
{
  "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"
  }
}
```

```json title="400"
{
  "error": {
    "code": "INVALID_ARGUMENT",
    "message": "Bad request. The request body included invalid request parameters."
  },
  "status": 400
}
```

```json title="402"
{
  "error": {
    "code": "PAYMENT_REQUIRED",
    "message": "Request failed. Pay all past due invoices to lift restrictions on your account."
  },
  "status": 402
}
```

```json title="403"
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Increase your quota or upgrade to create more indexes."
  },
  "status": 403
}
```

```json title="404"
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource cloud: aws region: us-west1 not found."
  },
  "status": 404
}
```

```json title="409"
{
  "error": {
    "code": "ALREADY_EXISTS",
    "message": "Resource already exists."
  },
  "status": 409
}
```

```json title="422"
{
  "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
}
```
:::

#### Authorizations

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `Api-Key` | `string` | - |  |

An API Key is required to call Pinecone APIs. Get yours from the [console](https://app.pinecone.io/).

#### Headers

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `X-Pinecone-Api-Version` | `string` | `2026-07` | Required date-based version header |

#### Body

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `string` | - | 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 |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `cloud` | `string` | - | The public cloud where you would like your index hosted. Possible values: gcp, aws, or azure. Example: aws |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `region` | `string` | - | The region where you would like your index to be created. Example: us-east-1 |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `deletion_protection?` | `string` | `disabled` |  |

Whether [deletion protection](/guides/manage-data-manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `tags?` | `object \| null` | - | 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. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `schema?` | `object` | - | 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. |

:::accordion{title="Show child attributes"}
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `fields?` | `object` | - | 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. At most 50 fields may be declared. Field names may not begin with $, which introduces a filter operator. When declared at index creation, names beginning with _ are also rejected (reserved for internal use). |
:::

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `read_capacity?` | `object` | - |  |

:::accordion{title="Show child attributes"}
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | `string` | - | 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. |
:::

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `embed` | `object` | - |  |

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](/guides/index-data-create-an-index#embedding-models) for available models and model details.

:::accordion{title="Show child attributes"}
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `model` | `string` | - | The name of the embedding model to use for the index. Example: multilingual-e5-large |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `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. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `field_map` | `object` | - | Identifies the name of the text field from your document model that will be embedded. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `dimension?` | `integer` | - | The dimension of embedding vectors produced for the index. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `read_parameters?` | `object` | - | The read parameters for the embedding model. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `write_parameters?` | `object` | - | The write parameters for the embedding model. |
:::

#### Response

`201` — The index has successfully been created for the embedding model.

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

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `string` | - | 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 |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `host` | `string` | - | The URL address where the index is hosted. Example: semantic-search-c01b5b5.svc.us-west1-gcp.pinecone.io |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `private_host?` | `string` | - | The private endpoint URL of an index. Example: semantic-search-c01b5b5.svc.private.us-west1-gcp.pinecone.io |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `status` | `object` | - | The current status of the index. |

:::accordion{title="Show child attributes"}
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `ready` | `boolean` | - | Whether the index is ready for use. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `state` | `string` | - | The current state of the index. Possible values: Initializing, InitializationFailed, Failed, ScalingUp, ScalingDown, ScalingUpPodSize, Terminating, Ready, or Disabled. |
:::

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `deployment` | `object` | - | Deployment configuration for a pod-based index. |

:::accordion{title="Show child attributes"}
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `deployment_type` | `enum<string>` | - | Identifies this as a pod-based deployment. Must be pod. Available options: pod |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `environment` | `string` | - | The environment where the index is hosted. Example: us-east1-gcp |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `replicas?` | `integer` | `1` | 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. Required range: 1 <= x |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `shards?` | `integer` | `1` | The number of shards. Shards split your data across multiple pods so you can fit more data into an index. Required range: 1 <= x |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `pod_type` | `string` | `p1.x1` | The type of pod to use. One of s1, p1, or p2 appended with . and one of x1, x2, x4, or x8. |
:::

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `read_capacity?` | `object` | - |  |

::::accordion{title="Show child attributes"}
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | `string` | - | 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. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `status` | `object` | - | The current status of factors affecting the read capacity of a serverless index |

:::accordion{title="Show child attributes"}
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `state` | `string` | - |  |

The `state` describes the overall status of factors relating to the read capacity of an index. Available values: - `Ready` is the state most of the time - `Scaling` if the number of replicas or shards has been recently updated by calling the [configure index endpoint](/guides/database-control-plane-configure-index) - `Migrating` if the index is being migrated to a new `node_type` - `Error` if there is an error with the read capacity configuration. In that case, see `error_message` for more details.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `current_replicas?` | `integer \| null` | - | The number of replicas. Each replica has dedicated compute resources and data storage. Increasing this number will increase the total throughput of the index. null for OnDemand indexes and for a Dedicated index that has not finished provisioning. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `current_shards?` | `integer \| null` | - | The number of shards. Each shard has dedicated storage. Increasing shards alleviates index fullness. null for OnDemand indexes and for a Dedicated index that has not finished provisioning. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `error_message?` | `string` | - | An optional error message indicating any issues with your read capacity configuration |
:::
::::

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `source_collection?` | `string` | - | The name of the collection this index was created from, if any. Example: movie-embeddings |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `source_backup_id?` | `string` | - | The ID of the backup this index was restored from, if any. Example: 670e8400-e29b-41d4-a716-446655440000 |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `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 |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `schema` | `object` | - | 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. |

:::accordion{title="Show child attributes"}
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `fields` | `object` | - | A map of field names to their configurations. Indexes that are served by the vectors API — created with the reserved _values / _sparse_values schema, or created by an earlier API version from dimension, metric, and vector_type — report their vector fields under the reserved names _values (dense) and _sparse_values (sparse), and any metadata fields configured for filtering as legacy fields carrying only filterable. Dense vectors-API indexes always report both _values and _sparse_values, regardless of how they were created. |
:::

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `tags?` | `object \| null` | - | 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. |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `deletion_protection` | `string` | `disabled` |  |

Whether [deletion protection](/guides/manage-data-manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`.

## Related pages

- [List indexes](./database-control-plane-list-indexes.md)
- [Create an index](./database-control-plane-create-index.md)
- [Describe an index](./database-control-plane-describe-index.md)
- [Delete an index](./database-control-plane-delete-index.md)
- [Configure an index](./database-control-plane-configure-index.md)
- [Get index stats](./database-data-plane-describeindexstats.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
