> ## 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.

# Classification - Beta

> Classify text into one or more predefined categories using LLM structured outputs.



## OpenAPI

````yaml /openapi/product/AI-Services.yaml post /api/ai/v1/classification
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/classification:
    post:
      tags:
        - AI Services - Classification
      summary: Classification - Beta
      description: >-
        Classify text into one or more predefined categories using LLM
        structured outputs.
      operationId: messagesClassification
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClassificationRequest'
            examples:
              Support Ticket Priority (Single-Label):
                description: >-
                  Classify support ticket by priority level using single-label
                  classification.
                value:
                  input:
                    - type: text
                      text: >-
                        URGENT: Our production dashboard is down and we can't
                        access any of our KPI data. This is affecting our entire
                        sales team and we need this resolved immediately!
                  labels:
                    - label: critical
                      description: >-
                        System outage or data loss affecting multiple users or
                        business operations
                    - label: high
                      description: >-
                        Significant functionality issue affecting user
                        productivity
                    - label: medium
                      description: >-
                        Feature not working as expected but workarounds
                        available
                    - label: low
                      description: Minor issue, cosmetic bug, or feature request
                  classificationType: SINGLE_LABEL
              Product Feedback (Multi-Label):
                description: Classify product feedback into multiple categories.
                value:
                  input:
                    - type: text
                      text: >-
                        The new filtering feature is great, but it would be even
                        better if we could save filter presets and share them
                        with our team. Also, the export functionality could use
                        some performance improvements when dealing with large
                        datasets.
                  labels:
                    - label: feature_request
                      description: Request for new functionality or capabilities
                    - label: enhancement
                      description: Suggestion to improve existing functionality
                    - label: bug_report
                      description: Report of incorrect behavior or errors
                    - label: performance
                      description: Feedback about speed, responsiveness, or resource usage
                    - label: usability
                      description: Feedback about user experience or ease of use
                  classificationType: MULTI_LABEL
              With Specific Model:
                description: Classification request with a specific model specified.
                value:
                  input:
                    - type: text
                      text: >-
                        URGENT: Our production dashboard is down and we can't
                        access any of our KPI data. This is affecting our entire
                        sales team and we need this resolved immediately!
                  labels:
                    - label: critical
                      description: >-
                        System outage or data loss affecting multiple users or
                        business operations
                    - label: high
                      description: >-
                        Significant functionality issue affecting user
                        productivity
                    - label: medium
                      description: >-
                        Feature not working as expected but workarounds
                        available
                    - label: low
                      description: Minor issue, cosmetic bug, or feature request
                  classificationType: SINGLE_LABEL
                  model: domo.domo_ai.domogpt-medium-v1.2:anthropic
        required: true
      responses:
        '200':
          description: Successful classification response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassificationResponse'
              examples:
                Classification Response:
                  description: Classification Response
                  value:
                    output:
                      - critical
                    classificationType: SINGLE_LABEL
                    model: domo.domo_ai.domogpt-medium-v1.2:anthropic
                    isCustomerModel: false
                    sessionId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    requestId: f9e8d7c6-b5a4-3210-fedc-ba9876543210
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                type: string
        '409':
          description: Conflict
      security:
        - domo-developer-token: []
components:
  schemas:
    ClassificationRequest:
      type: object
      description: >-
        Request for classifying content into predefined categories using the
        Messages API.

         <p>The Classification service uses LLM structured outputs to reliably classify content
         into one or more predefined categories. The service dynamically generates JSON
         schemas based on the provided labels to ensure type-safe responses.</p>
      properties:
        input:
          type: array
          description: >-
            The input message content to classify (text, images, documents,
            etc.)
          items:
            oneOf:
              - $ref: '#/components/schemas/TextMessageContent'
              - $ref: '#/components/schemas/ImageMessageContent'
              - $ref: '#/components/schemas/DocumentMessageContent'
        labels:
          type: array
          description: >-
            The list of possible classification labels with optional
            descriptions (2-50 labels required)
          items:
            $ref: '#/components/schemas/ClassificationLabel'
        classificationType:
          type: string
          description: 'The type of classification: SINGLE_LABEL or MULTI_LABEL'
          enum:
            - SINGLE_LABEL
            - MULTI_LABEL
        instructions:
          type: string
          description: Optional instructions for classification behavior
        model:
          type: string
          description: The ID of the model to use (optional, uses default if not specified)
        modelConfiguration:
          type: object
          additionalProperties: {}
          description: Additional model parameters (temperature, max_tokens, etc.)
        sessionId:
          type: string
          format: uuid
          description: AI session ID for associating with existing session
        reasoningConfig:
          $ref: '#/components/schemas/ReasoningConfig'
          description: Configuration for reasoning behavior
      required:
        - classificationType
        - input
        - labels
    ClassificationResponse:
      type: object
      description: |-
        Response for text classification.
         Supports both single-label and multi-label classifications uniformly.
         All classification responses return a list of labels via the output() method.
      properties:
        output:
          type: array
          description: The classification output - a list of selected labels.
          items:
            type: string
        classificationType:
          type: string
          description: The type of classification (SINGLE_LABEL or MULTI_LABEL).
          enum:
            - SINGLE_LABEL
            - MULTI_LABEL
        model:
          type: string
          description: The ID of the model used for classification.
        isCustomerModel:
          type: boolean
          description: Whether the model is a customer model (vs Domo provided).
        sessionId:
          type: string
          format: uuid
          description: The AI session ID associated with this response.
        requestId:
          type: string
          format: uuid
          description: The request ID associated with this response.
        modelProviderUsage:
          $ref: '#/components/schemas/ModelProviderUsage'
          description: The token usage from the model provider.
    TextMessageContent:
      allOf:
        - $ref: '#/components/schemas/MessageContent'
        - type: object
          properties:
            text:
              type: string
              description: the text content of the message
      description: Text-based message content.
    ImageMessageContent:
      allOf:
        - $ref: '#/components/schemas/MessageContent'
        - type: object
          properties:
            image:
              $ref: '#/components/schemas/Image'
              description: the image data and metadata
      description: Image-based message content.
    DocumentMessageContent:
      allOf:
        - $ref: '#/components/schemas/MessageContent'
        - type: object
          properties:
            document:
              $ref: '#/components/schemas/Document'
              description: the document data and metadata
      description: Document-based message content.
    ClassificationLabel:
      type: object
      description: >-
        Represents a classification label with an optional description to guide
        the LLM.
      properties:
        label:
          type: string
          description: The classification label value (required, 1-100 characters).
          minLength: 1
        description:
          type: string
          description: >-
            Optional description to help the LLM understand when to use this
            label (max 500 characters).
      required:
        - label
    ReasoningConfig:
      type: object
      properties:
        reasoningEffort:
          type: string
          enum:
            - NONE
            - LOW
            - MEDIUM
            - HIGH
    ModelProviderUsage:
      type: object
      properties:
        inputTokens:
          type: integer
          format: int64
        outputTokens:
          type: integer
          format: int64
        totalTokens:
          type: integer
          format: int64
        reasoningTokens:
          type: integer
          format: int64
    MessageContent:
      description: Base interface for multi-modal message content
      discriminator:
        propertyName: type
      properties:
        type:
          type: string
      required:
        - type
    Image:
      type: object
      description: Image data and metadata.
      properties:
        data:
          type: string
          description: the base64 encoded image data
        type:
          type: string
          description: the image type e.g. "base64"
        mediaType:
          type: string
          description: the media type of the image e.g. "image/png"
    Document:
      type: object
      description: Document data and metadata.
      properties:
        data:
          type: string
          description: the base64-encoded document data
        type:
          type: string
          description: the document type e.g. "base64"
        mediaType:
          type: string
          description: the media type of the document e.g. "application/pdf"
        name:
          type: string
          description: the name of the document
  securitySchemes:
    domo-developer-token:
      type: apiKey
      name: X-DOMO-Developer-Token
      in: header

````