# Upsert embeddings

```http
POST /projects/{project_reference}/embeddings
```

Upsert embeddings. Requires project.knowledge.write.

## Parameters

| Name                | In   | Required | Description |
| ------------------- | ---- | -------- | ----------- |
| `project_reference` | path | Yes      |             |

## Request body

| Field       | Type   | Required | Description                                                                                   |
| ----------- | ------ | -------- | --------------------------------------------------------------------------------------------- |
| `chunk_ids` | array  | Yes      | Chunk IDs to upsert embeddings for.                                                           |
| `vectors`   | array  | Yes      | Embedding vectors aligned by index with `chunk_ids`.                                          |
| `model`     | object | Yes      | Embedding model that produced these vectors. Not an agent chat model; model listings omit it. |

## Responses

| Status | Description                                                                     |
| ------ | ------------------------------------------------------------------------------- |
| 200    | Upsert results. Stores embeddings generated by clients for project file chunks. |
| 400    | Invalid request.                                                                |
| 401    | Unauthorized                                                                    |
| 403    | Forbidden                                                                       |
| 404    | Project not found                                                               |
| 500    | Server error                                                                    |
