Summarize
    • PDF

    Summarize

    • PDF

    Article summary

    Available in Classic and VPC

    Summarize long sentences by applying different options.

    Request

    This section describes the request format. The method and URI are as follows:

    MethodURI
    POST/v1/api-tools/summarization/v2

    Request headers

    The following describes the request headers.

    FieldRequiredDescription
    AuthorizationRequiredAPI key for authentication <e.g.,> Bearer nv-************
    X-NCP-CLOVASTUDIO-REQUEST-IDOptionalRequest ID
    Content-TypeRequiredRequest data format
    • application/json

    Request body

    You can include the following data in the body of your request:

    FieldTypeRequiredDescription
    textsArrayRequiredSentence to summarize
    • 1-35,000 characters (based on Korean, including spaces)
    autoSentenceSplitterBooleanOptionalWhether to allow paragraph breaks in sentences to summarize
    • true (default) | false
      • true: Apply paragraph breaks, segCount, segMaxSize, and segMinSize
      • false: No paragraph breaks
    segCountIntegerOptionalNumber of paragraph breaks for the sentences to summarize
    • -1 (default) | 1 or higher
      • -1: The model automatically performs with optimal values
    segMaxSizeIntegerOptionalMaximum number of characters per paragraph when breaking paragraphs
    • 1-3000 (based on Korean, including spaces)
    segMinSizeIntegerOptionalMinimum number of characters per paragraph when breaking paragraphs
    • 0-segMaxSize value (default: 300)
    includeAiFiltersBooleanOptionalWhether to apply AI Filter
    • true | false (default)
      • true: Apply
      • false: Do not apply

    Request example

    The request example is as follows:

    curl --location --request POST 'https://clovastudio.stream.ntruss.com/testapp/v1/api-tools/summarization/v2' \
    --header 'Authorization: Bearer {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

    This section describes the response format.

    Response body

    The response body includes the following data:

    FieldTypeRequiredDescription
    textString-Summary result
    inputTokensInteger-Number of tokens in the sentence to summarize

    Response example

    The response example is as follows:

    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?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.