---
title: "Set New Embedding Model"
method: POST
path: "/secondary-index/set-new-embedding-model"
---

# Set New Embedding Model

`POST /secondary-index/set-new-embedding-model`

Creates a new EmbeddingModel row and cancels the previous secondary indexing if any
Gives an error if the same model name is used as the current or secondary index

## Request body

- EmbeddingModelDetail
  - `model_name` string, required
  - `model_dim` integer, required
  - `normalize` boolean, required
  - `query_prefix` string
  - `passage_prefix` string

## Response `200`

Successful Response

- IdReturn
  - `id` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/engineertheory/apis/recap-backend.md) · [All operations](https://skmtc.net/engineertheory/apis/recap-backend/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/engineertheory/recap-backend/versions/ea9db8f9a24d/schema)
