---
title: "Token Chunker"
method: POST
path: "/v1/chunk/token"
---

# Token Chunker

`POST /v1/chunk/token`

Splits text into chunks based on token count, ensuring each chunk stays within specified token limits.

## Response `200`

Successful Response: A list of `Chunk` objects.

- Chunk[] — A list containing `Chunk` objects, each detailing a segment of the original text based on token count.
  - `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.

## Changes

- **2025-05-04** `33dc37e4abcd` — 1 info
  - added the optional property `items/context` to the response with the `200` status
- **2025-04-27** `bc64e1775952` — 1 info
  - endpoint added
- **2025-04-27** `5c8e44804806` — 1 breaking
  - api removed without deprecation
- **2025-04-27** `7e3cb743a9ed` — 1 warning
  - removed the request property `text`
- **2025-04-22** `b5fe83cf70c6` — 1 breaking, 1 info
  - removed the media type `application/json` from the request body
  - added the media type `multipart/form-data` to the request body

[Full history](https://skmtc.dev/feyninc/apis/chonkie-api/changes/v1/chunk/token/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)
