---
title: "Tokenize text"
method: POST
path: "/v1/apple/nlp/tokenize"
tags: ["Apple"]
---

# Tokenize text

`POST /v1/apple/nlp/tokenize`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/apple/nlp/tokenize`
- Auth: HTTP bearer

Splits text into tokens (words, sentences, or paragraphs).

## Request body

- object
  - `text` string, required: Input text to analyze
  - `unit` 'word' | 'sentence' | 'paragraph' | 'document'

## Response `200`

Tokens

- object
  - `tokens` string[]
  - `unit` string

## Other responses

- `400`: Invalid request

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
