> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.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/aiservices.yaml post /api/ai/v1/text/summarize
openapi: 3.0.0
info:
  title: AI Services API
  version: v1
  description: >-
    API for Domo's AI services, including Text Generation, Text-to-SQL, and
    Summarization.
servers:
  - url: https://{instance}.domo.com
    description: Domo Instance
    variables:
      instance:
        default: api
        description: Your specific Domo instance name (e.g., mycompany)
security:
  - developerToken: []
tags:
  - name: AI Services
    description: Endpoints for AI-powered text operations.
paths:
  /api/ai/v1/text/summarize:
    post:
      tags:
        - AI Services
      summary: Text Summarization
      description: Generate a summary based on the given text input.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextSummarizationRequest'
            examples:
              Basic:
                summary: Basic Example
                value:
                  input: >-
                    San Francisco, officially the City and County of San
                    Francisco, is a commercial, financial, and cultural
                    center...
              Customized:
                summary: Customized Example
                value:
                  input: >-
                    San Francisco, officially the City and County of San
                    Francisco, is a commercial, financial, and cultural
                    center...
                  outputWordLength:
                    min: 5
                    max: 10
                  outputStyle: PARAGRAPH
                  model: domo.domo_ai.domogpt-summarize-v1:anthropic
      responses:
        '200':
          description: The generated text summary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AIResponse'
              example:
                output: >-
                  Vibrant, densely populated commercial and cultural hub in
                  Northern California.
                modelId: domo.domo_ai.domogpt-summarize-v1:anthropic
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    TextSummarizationRequest:
      type: object
      required:
        - input
      properties:
        input:
          type: string
          description: The input text to send to the model.
        outputStyle:
          type: string
          description: The formatting of the summarized output.
          enum:
            - BULLETED
            - NUMBERED
            - PARAGRAPH
        outputWordLength:
          $ref: '#/components/schemas/OutputWordLength'
        model:
          type: string
          description: The ID of the model to use.
        modelConfiguration:
          $ref: '#/components/schemas/ModelConfiguration'
        promptTemplate:
          $ref: '#/components/schemas/PromptTemplate'
        parameters:
          $ref: '#/components/schemas/ModelParameters'
        system:
          type: string
          description: The system message to use.
    AIResponse:
      type: object
      description: Standard successful AI response.
      properties:
        output:
          type: string
        modelId:
          type: string
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message.
    OutputWordLength:
      type: object
      properties:
        min:
          type: integer
        max:
          type: integer
      example:
        min: 5
        max: 10
    ModelConfiguration:
      type: object
      description: >-
        Additional model-specific configuration key-value pairs (e.g.,
        temperature).
      additionalProperties: true
      example:
        temperature: 0.7
        max_tokens: 1024
    PromptTemplate:
      type: object
      description: >-
        A prompt template object. The 'template' string should contain
        placeholders.
      properties:
        template:
          type: string
          example: 'Respond to the following in ${language}: ${input}'
    ModelParameters:
      type: object
      description: Custom parameters to inject into the prompt template.
      additionalProperties: true
      example:
        language: Japanese
  securitySchemes:
    developerToken:
      type: apiKey
      in: header
      name: X-DOMO-Developer-Token
      description: Domo Developer Token for authentication.

````