# PartitionEmbeddingCredentialsRequest

Sets a partition's embedding keys and its consent to fall back to Maitento's key, replacing whatever was there. Send the whole list every time. Setting the keys also clears any recorded failures, so a key that was skipped after failing is tried again.

**Kind:** an object, used in requests.

## Fields

| Field | Type | Required | Description |
|---|---|---|---|
| `credentials` | [`PartitionEmbeddingCredentialInput`](https://docs.maitento.com/reference/types/partition-embedding-credential.md#in-a-request)`[]` | yes | The keys, in failover order. May be empty only with `allowMaitentoFallback` true, which means "no key of my own, use Maitento's". To remove the keys, use `DELETE /partitions/by-id/{id}/embedding-credentials`. Constraints: required (empty or whitespace-only strings are rejected). |
| `allowMaitentoFallback` | `boolean` |  | Consent to fall back to Maitento's key when every key above has failed. Defaults to false: once your own keys are exhausted, the embedding fails. |

## Example

```json
{
  "credentials": [
    {
      "provider": "OpenAi",
      "apiKey": "...",
      "baseUrl": "...",
      "modelIdentifier": "...",
      "credentialId": "...",
      "priority": 0
    }
  ],
  "allowMaitentoFallback": false
}
```

## Where it's used

- [`partitions.setEmbeddingCredentials`](https://docs.maitento.com/reference/api/partitions.md) (`PUT /partitions/by-id/{id}/embedding-credentials`)
