# PartitionEmbeddingProfile

Which embedding model a partition's files are indexed with, at what width, and how they are cut into chunks first. Changing it changes the index, so it is never edited in place: it is replaced with `PUT /partitions/by-id/{id}/embedding-profile`, which embeds every file again and refuses search until that has finished.

**Kind:** an object, used in requests and responses. In a request it is called `PartitionEmbeddingProfileInput`.

## In a request

| Field | Type | Required | Description |
|---|---|---|---|
| `provider` | [`EmbeddingProvider`](https://docs.maitento.com/reference/types/embedding-provider.md) |  | The provider that serves the model. |
| `model` | `string` | yes | The model id: one listed by `GET /partitions/embedding-models`, unless `custom` is true. Constraints: required (empty or whitespace-only strings are rejected). |
| `dimensions` | `integer \| null` |  | The output width. Null: the model's native width. Must be one of the model's supported widths. For a custom model it is required, must be a width Maitento can index, and must be the width a test call measured. |
| `chunkSizeTokens` | `integer \| null` |  | Chunk size in tokens. Null: the model's default. At most the model's maximum. |
| `chunkOverlapTokens` | `integer \| null` |  | Overlap between consecutive chunks, in tokens. Null: the model's default. At most a quarter of the chunk size. |
| `custom` | `boolean \| null` |  | True for your own model, on your own endpoint, rather than one Maitento lists. Accepted only after a test call (`POST /partitions/embedding-profile/probe`) has measured that it returns vectors of exactly `dimensions`. Null or false: a listed model. |

```json
{
  "provider": "OpenAi",
  "model": "...",
  "dimensions": 0,
  "chunkSizeTokens": 0,
  "chunkOverlapTokens": 0,
  "custom": false
}
```

## In a response

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `provider` | [`EmbeddingProvider`](https://docs.maitento.com/reference/types/embedding-provider.md) | The provider that serves the model. |
| `model` | `string` | The model id: one listed by `GET /partitions/embedding-models`, unless `custom` is true. Constraints: required (empty or whitespace-only strings are rejected). |
| `dimensions` | `integer \| null` | The output width. Null: the model's native width. Must be one of the model's supported widths. For a custom model it is required, must be a width Maitento can index, and must be the width a test call measured. |
| `chunkSizeTokens` | `integer \| null` | Chunk size in tokens. Null: the model's default. At most the model's maximum. |
| `chunkOverlapTokens` | `integer \| null` | Overlap between consecutive chunks, in tokens. Null: the model's default. At most a quarter of the chunk size. |
| `custom` | `boolean \| null` | True for your own model, on your own endpoint, rather than one Maitento lists. Accepted only after a test call (`POST /partitions/embedding-profile/probe`) has measured that it returns vectors of exactly `dimensions`. Null or false: a listed model. |

```json
{
  "provider": "OpenAi",
  "model": "...",
  "dimensions": 0,
  "chunkSizeTokens": 0,
  "chunkOverlapTokens": 0,
  "custom": false
}
```

## Where it's used

- Inside [`Partition`](https://docs.maitento.com/reference/types/partition.md)
- Inside [`PartitionEmbeddingIndexState`](https://docs.maitento.com/reference/types/partition-embedding-index-state.md)
- Inside [`PartitionEmbeddingProbeRequest`](https://docs.maitento.com/reference/types/partition-embedding-probe-request.md)
- Inside [`PartitionEmbeddingProfileRequest`](https://docs.maitento.com/reference/types/partition-embedding-profile-request.md)
