Summarize
    • PDF

    Summarize

    • PDF

    Article summary

    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:

    MethodURI
    POST/testapp/v1/api-tools/summarization/v2/{appId}

    Request headers

    The following describes the headers.

    HeaderRequiredDescription
    X-NCP-CLOVASTUDIO-API-KEYYAPI key issued when creating the test app
    X-NCP-APIGW-API-KEYYAPI Gateway key issued when creating the test app or service app
    X-NCP-CLOVASTUDIO-REQUEST-IDNRequest ID for each request
    Content-TypeYapplication/json

    Request path parameters

    The following describes the parameters.

    FieldTypeRequiredDescription
    appIdstringY
  • Unique ID of the applicable test app or service app
  • Request body

    The following describes the body.

    FieldTypeRequiredDescription
    textsarray[string]YList of sentences to summarize
  • Range: up to 35,000 characters (based on Korean, including spaces)
  • autoSentenceSplitterbooleanNWhether to allow sentence separation in the list of sentences to summarize
  • true: segCount, segMaxSize, and segMinSize parameters work (default)
  • false: segCount, segMaxSize, and segMinSize parameters don't work
  • segCountintegerNNumber of paragraphs to separate the list of sentences to summarize
  • Range: 1 or greater (Model split to optimal number of paragraphs when set to -1)
  • Default: -1
  • segMaxSizeintegerNMaximum number of characters in a string to be included in a paragraph when separating paragraphs
  • Range: 1 - 3000 characters (based on Korean, including spaces)
  • Default: 1000
  • postProcessbooleanNWhether to perform post-processing to merge or split paragraphs to the desired length after performing a paragraph break
  • true: Parameters related to postProcess work (default)
  • false: Parameters related to postProcess don't work
  • segMaxSizeintegerNMinimum number of characters in a string to be included in a paragraph when separating paragraphs
  • Range: 0 - segMaxSize (default: 300)
  • includeAiFiltersbooleanNWhether to apply AI Filter (default: false)

    Request syntax

    The following is a sample syntax.

    curl --location 'https://clovastudio.apigw.ntruss.com/testapp/v1/api-tools/summarization/v2/{appId}' \
    --header 'X-NCP-CLOVASTUDIO-API-KEY: <X-NCP-CLOVASTUDIO-API-KEY>' \
    --header 'X-NCP-APIGW-API-KEY: <X-NCP-APIGW-API-KEY>' \
    --header 'X-NCP-CLOVASTUDIO-REQUEST-ID: <X-NCP-CLOVASTUDIO-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 body.

    FieldTypeRequiredDescription
    textstringYSummary results
    inputTokensintegerYNumber of tokens used when typing a sentence to summarize

    Response syntax

    The following is a sample syntax.

    Success

    The following is a sample syntax 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 syntax 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.