> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-bradley-turek-pfilter-operators-reference.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Text Summarization

> Generate a summary based on the given text input.



## OpenAPI

````yaml /openapi/product/AI-Services.yaml post /api/ai/v1/text/summarize
openapi: 3.1.0
info:
  title: AI Services
  description: >-
    Domo AI Services provide a consistent API to leverage Foundation Models to
    solve common problems such as natural language SQL generation (text-to-SQL),
    Summarization, Classification, Tool Calling and others.
  version: 2.3.3639_master
servers:
  - url: https://{subdomain}.domo.com
    variables:
      subdomain:
        description: The Domo instance subdomain.
        default: subdomain
security: []
tags:
  - name: AI Services - Classification
    description: Domo AI Service Classification APIs
  - name: AI Services - Data Extraction
    description: Domo AI Service Data Extraction APIs
  - name: AI Services - Embedding
    description: Domo AI Service Embedding APIs
  - name: AI Services - Image
    description: Domo AI Service Image APIs
  - name: AI Services - Messages
    description: Domo AI Service Messages APIs
  - name: AI Services - Sentiment Analysis
    description: Domo AI Service Sentiment Analysis APIs
  - name: AI Services - Text
    description: Domo AI Service Text APIs
paths:
  /api/ai/v1/text/summarize:
    post:
      tags:
        - AI Services - Text
      summary: Text Summarization
      description: Generate a summary based on the given text input.
      operationId: summarize
      requestBody:
        description: Text Summarization AI request.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextSummarizationRequest'
            examples:
              Basic:
                description: Basic Text Summarization request.
                value:
                  input: >-
                    San Francisco, officially the City and County of San
                    Francisco, is a commercial, financial, and cultural center
                    in Northern California. With a population of 808,437
                    residents as of 2022, San Francisco is the fourth most
                    populous city in the U.S. state of California. The city
                    covers a land area of 46.9 square miles (121 square
                    kilometers) at the end of the San Francisco Peninsula,
                    making it the second-most densely populated large U.S. city
                    after New York City and the fifth-most densely populated
                    U.S. county, behind only four New York City boroughs. Among
                    the 92 U.S. cities proper with over 250,000 residents, San
                    Francisco is ranked first by per capita income and sixth by
                    aggregate income as of 2022.
              Custom Response Length:
                description: Text Summarization request with custom response length.
                value:
                  input: >-
                    San Francisco, officially the City and County of San
                    Francisco, is a commercial, financial, and cultural center
                    in Northern California. With a population of 808,437
                    residents as of 2022, San Francisco is the fourth most
                    populous city in the U.S. state of California. The city
                    covers a land area of 46.9 square miles (121 square
                    kilometers) at the end of the San Francisco Peninsula,
                    making it the second-most densely populated large U.S. city
                    after New York City and the fifth-most densely populated
                    U.S. county, behind only four New York City boroughs. Among
                    the 92 U.S. cities proper with over 250,000 residents, San
                    Francisco is ranked first by per capita income and sixth by
                    aggregate income as of 2022.
                  outputWordLength:
                    min: 5
                    max: 10
        required: true
      responses:
        '200':
          description: >-
            TextAIResponse The generated summary and model token usage
            information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextAIResponse'
              examples:
                Text Summarization Response:
                  description: Text Summarization Response
                  value:
                    prompt: >-
                      Write a 5 to 10 words summary of the following text.
                      ```...``` CONCISE SUMMARY:
                    output: >-
                      Vibrant, densely populated commercial and cultural hub in
                      Northern California.
                    modelId: domo.domo_ai.domogpt-summarize-v1:anthropic
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                type: string
        '409':
          description: Conflict
      security:
        - domo-developer-token: []
components:
  schemas:
    TextSummarizationRequest:
      type: object
      description: |-
        <p>
         Text Summarization AI Service Request.
         </p>

         <h2>Prompt Templates</h2>
         <p>
         A prompt template is a string that contains placeholders for parameters that will be replaced with parameter values before the prompt
         is submitted to the model.
         </p>
         <p>
         A default prompt template is set for each model configured for the Text Summarization AI Service. Individual requests can override the
         default template by including the <code>promptTemplate</code> parameter.
         </p>
         <h3>Prompt Template Parameters</h3>
         <p>
         The following request parameters are automatically injected into the prompt template if the associated placeholder is present:
         <ul>
          <li>input</li>
          <li>system</li>
         </ul>
         </p>
         <p>
         Models with built-in support for system prompts and chat message history do not need to include <em>system</em> or
         <em>chatContext</em> in the prompt template.
         </p>
         <p>
         Additional parameters can be provided in the <code>parameters</code> map as key-value pairs.
         </p>
         <h3>Prompt Template Examples</h3>
         <ul>
             <li>"${input}"</li>
             <li>"${system}\n${input}"</li>
         </ul>
      properties:
        input:
          type: string
          description: Text information to be summarized.
        sessionId:
          type: string
          format: uuid
          description: >-
            The AI session ID. If provided, this request will be associated with
            the specified AI Session.
        promptTemplate:
          $ref: '#/components/schemas/ParameterizedPromptTemplate'
          description: >-
            The prompt template to use for the Text Summarization task. The
            default prompt template configured for the
                                          model will be used if not provided.
        parameters:
          type: object
          additionalProperties:
            type: string
          description: >-
            Custom parameters to inject into the prompt template if an
            associated placeholder is present.
        model:
          type: string
          description: >-
            The ID of the model to use for Text Summarization. The specified
            model must be configured for the Text
                                          Summarization
                                          AI Service by an Admin.
        modelConfiguration:
          type: object
          additionalProperties: {}
          description: >-
            Additional model-specific configuration parameter key-value pairs.
            e.g. temperature, max_tokens, etc.
        system:
          type: string
          description: >-
            The system message to use for the Text Summarization task. If not
            provided, the default system message
                                          will be used. If
                                          the model does not include built-in support for system prompts, this parameter may be included in the prompt
                                          template using the "${system}" placeholder.
        chunkingConfiguration:
          $ref: '#/components/schemas/ChunkingConfiguration'
          description: Configuration for dividing long text into smaller parts or chunks.
        outputStyle:
          type: string
          description: >-
            Determines the design, structuring and organization of the
            summarization output.
          enum:
            - bulleted
            - numbered
            - paragraph
            - unknown
        outputWordLength:
          $ref: '#/components/schemas/SizeBoundary'
          description: >-
            Defines a size boundary to limit the length of the output summary,
            based on number of words.
        temperature:
          type: number
          format: double
          description: >-
            Controls randomness in the model's output. Lower values make output
            more deterministic.
        maxTokens:
          type: integer
          format: int32
          description: The maximum number of tokens to generate in the response.
        reasoningConfig:
          $ref: '#/components/schemas/ReasoningConfig'
          description: Configuration for reasoning behavior and effort level.
      required:
        - input
    TextAIResponse:
      type: object
      description: Response from a text AI Service.
      properties:
        prompt:
          type: string
          description: The formatted prompt that was used to generate the response.
        choices:
          type: array
          deprecated: true
          description: The list of choices generated by the model.
          items:
            $ref: '#/components/schemas/Choice'
        modelId:
          type: string
          description: The id of the model used to generate the response.
        sessionId:
          type: string
          format: uuid
          description: The id of the AI Session associated with this request.
        output:
          type: string
          description: The output of the model.
        modelProviderUsage:
          $ref: '#/components/schemas/ModelProviderUsage'
          description: The token usage from the model provider.
    ParameterizedPromptTemplate:
      type: object
      description: |-
        <p>
         A prompt template string that contains placeholders for parameters that will be replaced with parameter values before the prompt
         is submitted to the model.
         </p>
         <p>
         <h3>Prompt Template Examples</h3>
         <ul>
             <li>"${input}"</li>
             <li>"${system}\n${input}"</li>
         </ul>
      properties:
        template:
          type: string
    ChunkingConfiguration:
      type: object
      description: A configuration for chunking of textual information.
      properties:
        maxChunkSize:
          type: integer
          format: int32
          description: |-
            This parameter prevents the chunks from exceeding a specific size.
                 It is a limit on the number of words that each chunk can include.
        chunkOverlap:
          type: integer
          format: int32
          description: |-
            Dictates the overlap between consecutive chunks.
                 It is the count of common characters between two adjacent chunks.
        separators:
          type: array
          description: >-
            It is a list of characters or Strings which can be used to start a
            new chunk when they appear in the original text.
                 They are ordered from highest to lowest priority. Highest priority separator is used to split a new chunk first.
                 If it is not present, we move to the next separator.
          items:
            type: string
        separatorType:
          type: string
          description: Type of separator being used.
          enum:
            - text
            - html
            - json
            - markdown
            - python
            - javascript
            - java
            - go
            - cpp
            - latex
            - rst
            - ruby
            - rust
            - proto
            - scala
            - sol
            - php
            - swift
        disallowIntermediateChunks:
          type: boolean
          description: >-
            If set to true, only the original text will be chunked preventing
            further summarization of
                 summaries if needed.
    SizeBoundary:
      type: object
      properties:
        min:
          type: integer
          format: int32
        max:
          type: integer
          format: int32
    ReasoningConfig:
      type: object
      properties:
        reasoningEffort:
          type: string
          enum:
            - NONE
            - LOW
            - MEDIUM
            - HIGH
    Choice:
      type: object
      description: A choice generated by a text AI model.
      properties:
        output:
          type: string
          description: The text model output.
    ModelProviderUsage:
      type: object
      properties:
        inputTokens:
          type: integer
          format: int64
        outputTokens:
          type: integer
          format: int64
        totalTokens:
          type: integer
          format: int64
        reasoningTokens:
          type: integer
          format: int64
  securitySchemes:
    domo-developer-token:
      type: apiKey
      name: X-DOMO-Developer-Token
      in: header

````