Summarize
- Print
- PDF
Summarize
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in Classic and VPC
Summarize long sentences by applying different options.
Request
The following describes the request format for the endpoint. The request format is as follows:
Method | URI |
---|---|
POST | /testapp/v1/api-tools/summarization/v2/{appId} |
Request headers
The following describes the request headers.
Field | Required | Description |
---|---|---|
X-NCP-CLOVASTUDIO-API-KEY | Required | API key issued when creating the test app or service app |
X-NCP-APIGW-API-KEY | Required | API Gateway key issued when creating the test app or service app |
X-NCP-CLOVASTUDIO-REQUEST-ID | Optional | Request ID |
Content-Type | Required | Request data format
|
Request path parameters
The following describes the request path parameters.
Field | Type | Required | Description |
---|---|---|---|
appId | String | Required | ID of the test app or service app |
Request body
The following describes the request body.
Field | Type | Required | Description |
---|---|---|---|
texts | Array | Required | Sentence to summarize
|
autoSentenceSplitter | Boolean | Optional | Whether to allow paragraph breaks in sentences to summarize
|
segCount | Integer | Optional | Number of paragraph breaks for the sentences to summarize
|
segMaxSize | Integer | Optional | Maximum number of characters per paragraph when breaking paragraphs
|
segMinSize | Integer | Optional | Minimum number of characters per paragraph when breaking paragraphs
|
includeAiFilters | Boolean | Optional | Whether to apply AI Filter
|
Request example
The following is a sample request.
curl --location --request POST 'https://clovastudio.apigw.ntruss.com/testapp/v1/api-tools/summarization/v2/{appId}' \
--header 'X-NCP-CLOVASTUDIO-API-KEY: {CLOVA Studio API Key}' \
--header 'X-NCP-APIGW-API-KEY: {API Gateway API Key}' \
--header 'X-NCP-CLOVASTUDIO-REQUEST-ID: {Request ID}' \
--header 'Content-Type: application/json' \
--data '{
"texts": [
"The following are some of the many features that CLOVA Studio offers. - Sentence generation: Just type in a few keywords and generate sentences based on those keywords for screenwriting, cover letter writing, email writing, marketing copy creation, etc. - Summarization: Identify key elements from a long article, such as a plot, report, or email, and summarize the article based on the set summary length. - Categorization: Categorize features such as sentence type, document index, sentiment, intent, or extract keywords from paragraphs. - Conversation: Create AIs with unique personas through example inputs to create conversational interfaces such as encyclopedic chatbots, custom chatbots, etc. - Sentence conversion: Convert sentences into sentences with a similar style to the entered example. AI Filter: AI Filter detects and alerts you when sensitive or unsafe output is being generated."
],
"autoSentenceSplitter": true,
"segCount": -1,
"segMaxSize": 1000,
"segMinSize": 300,
"includeAiFilters": false
}'
Response
The following describes the response format.
Response body
The following describes the response body.
Field | Type | Required | Description |
---|---|---|---|
text | String | - | Summary result |
inputTokens | Integer | - | Number of tokens in the sentence to summarize |
Response example
The following is a sample example.
Succeeded
The following is a sample response upon a successful call.
{
"status": {
"code": "20000",
"message": "OK"
},
"result": {
"text": "- Explaining the different features that CLOVA Studio offers",
"inputTokens": 187
}
}
Failure
The following is a sample response upon a failed call.
Was this article helpful?