---
title: "Split text into paragraphs"
method: POST
path: "/nlp/v1/sync/paragraphs"
tags: ["NLP", "Sync"]
---

# Split text into paragraphs

`POST /nlp/v1/sync/paragraphs`

## Request

- Base URL: `https://apis.daglo.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://apis.daglo.ai/nlp/v1/sync/paragraphs`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/daglo/apis/cloud-api/docs/nlp/v1/sync/paragraphs/post.ts> (a function with typed inputs; its response is checked against the schema)

주어진 문장들의 내용을 분석하여 내용이 비슷한 문장들 끼리 묶어 문단으로 분리합니다. 전체 문장을 배열 형태로 주면 각 문단의 시작 문장을 인덱스 형태로 반환합니다.

## Request body

- object
  - `sentences` string[], required: 문단으로 분리할 문장들을 텍스트 배열 형태로 명시합니다. 하나의 문장은 하나의 배열 요소가 되어야 합니다. 한국어와 영어를 사용가능합니다.
  - `charsPerParagraph` integer: 한 문단을 구성하는 글자 수에 대한 힌트입니다. 문단을 분리할 때 참고가 되며, 반드시 지켜지는 값은 아닙니다.
  - `returnElapsedTime` boolean: 계산 소요 시간 반환 여부입니다. `true` 일 경우 response body에 elapsedTime이 추가됩니다.
  - `custom` object: 응답에 포함하여 받고 싶은 사용자 객체를 명시합니다. 사용자가 요청에 custom 객체를 명시한 경우 동일한 값이 응답에 명시되어 반환됩니다. 요청을 자동화 하여 보낼 때 유용합니다.

## Response `200`

Example response

- object
  - `startIndexes` integer[]: 각 문단의 첫번째 문장의 인덱스로 구성된 배열입니다. 인덱스는 0부터 시작합니다. 분리된 문단의 개수와 배열의 크기는 동일합니다.
  - `elapsedTime` integer: 밀리초.
  - `custom` object: 응답에 포함하여 받고 싶은 사용자 객체를 명시합니다. 사용자가 요청에 custom 객체를 명시한 경우 동일한 값이 응답에 명시되어 반환됩니다. 요청을 자동화 하여 보낼 때 유용합니다.

## Other responses

- `204`: No Content. 요청은 성공하였으나 반환한 결과가 없습니다. 받아쓰기의 경우 받아쓰기는 완료되었으나 결과가 비어있습니다.
- `400`: Bad Request. 요청 형식이 잘못 되었습니다.
- `401`: Unauthorized.
- `403`: Forbidden. 허용되지 않은 접근입니다.
- `413`: Payload Too Large. 요청이 너무 큽니다.
- `415`: Unsupported Media Type.
- `429`: Too Many Requests.
- `500`: Internal Server Error. 서버 오류입니다.
- `503`: Service Unavailable.

---

[API](https://skmtc.dev/daglo/apis/cloud-api.md) - [All operations](https://skmtc.dev/daglo/apis/cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/daglo/apis/cloud-api/revisions/cf504ab299ce?raw)
