---
title: "Embeddings Refinery"
method: POST
path: "/v1/refine/embeddings"
---

# Embeddings Refinery

`POST /v1/refine/embeddings`

Adds embeddings to a list of provided chunks using a specified embedding model.

## Request body

- EmbeddingsRefineryREQ — Request body for the Embeddings Refinery endpoint.
  - `chunks` Chunk[], required — A list of `Chunk` objects (as dictionaries) to add embeddings to.
    - `text` string — The actual text content of the chunk.
    - `start_index` integer — The starting character index of the chunk within the original input text.
    - `end_index` integer — The ending character index (exclusive) of the chunk within the original input text.
    - `token_count` integer — The number of tokens in this specific chunk, according to the tokenizer used.
    - `context` string, nullable — Chunk context.
  - `embedding_model` string, required — Model identifier (e.g., from Hugging Face) or a compatible embedding model instance string representation.

## Response `200`

Successful Response: A list of `Chunk` objects with added embeddings.

- ChunkWithEmbedding[] — A list containing `Chunk` objects, each with an added `embedding` field.
  - `text` string — The actual text content of the chunk.
  - `start_index` integer — The starting character index of the chunk within the original input text.
  - `end_index` integer — The ending character index (exclusive) of the chunk within the original input text.
  - `token_count` integer — The number of tokens in this specific chunk, according to the tokenizer used.
  - `context` string, nullable — Chunk context.
  - `embedding` number[], nullable — Embedding vector (list of floats) for the chunk.

## Other responses

- `422` — Validation Error

## Changes

- **2025-05-04** `33dc37e4abcd` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/feyninc/apis/chonkie-api/changes/v1/refine/embeddings/post.md)

---

[API](https://skmtc.dev/feyninc/apis/chonkie-api.md) · [All operations](https://skmtc.dev/feyninc/apis/chonkie-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/feyninc/chonkie-api/revisions/8a6665f478db/schema)
