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

# Chat Messages

> Process a chat messages request.



## OpenAPI

````yaml /openapi/product/AI-Services.yaml post /api/ai/v1/messages/chat
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/messages/chat:
    post:
      tags:
        - AI Services - Messages
      summary: Chat Messages
      description: Process a chat messages request.
      operationId: chatMessages
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatMessagesAIRequest'
            examples:
              Basic:
                description: Basic Chat Messages request.
                value:
                  input:
                    - role: USER
                      content:
                        - type: TEXT
                          text: Why is the sky blue?
        required: true
      responses:
        '200':
          description: Successful chat messages response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessagesAIResponse'
              examples:
                Chat Messages Response:
                  description: Chat Messages Response
                  value:
                    content:
                      - type: TEXT
                        text: >-
                          The sky appears blue due to a phenomenon called
                          Rayleigh scattering.
                    modelId: domo.domo_ai.domogpt-medium-v1.2:anthropic
                    isCustomerModel: false
                    sessionId: e1f6a485-7fb6-4f71-b41c-37d6cb5f6bd3
                    requestId: df2256fd-d133-4ea1-b958-295be09be7c1
                    stopReason: END_TURN
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                type: string
        '409':
          description: Conflict
      security:
        - domo-developer-token: []
components:
  schemas:
    ChatMessagesAIRequest:
      type: object
      description: Request for interacting with the chat message AI service.
      properties:
        input:
          type: array
          description: The list of input messages to be processed by the AI.
          items:
            $ref: '#/components/schemas/Message'
        sessionId:
          type: string
          format: uuid
          description: >-
            The unique identifier for the AI session associated with this
            request.
        system:
          type: array
          description: System-level messages or configurations to guide the AI's response.
          items:
            $ref: '#/components/schemas/TextMessageContent'
        model:
          type: string
          description: The identifier of the AI model to be used for generating a response.
        modelConfiguration:
          type: object
          additionalProperties: {}
          description: >-
            Specific parameters or settings that configure the AI model
            behavior.
        temperature:
          type: number
          format: double
          description: A parameter for controlling the randomness of the model's output.
        maxTokens:
          type: integer
          format: int32
          description: The maximum number of tokens to generate in the response.
        responseFormat:
          description: Model response format specification for structured outputs.
          oneOf:
            - $ref: '#/components/schemas/JsonResponseFormat'
        reasoningConfig:
          $ref: '#/components/schemas/ReasoningConfig'
          description: Configuration for reasoning behavior and effort level.
    MessagesAIResponse:
      type: object
      description: Response from a Messages API.
      properties:
        content:
          type: array
          description: The list of content generated by the model.
          items:
            oneOf:
              - $ref: '#/components/schemas/TextMessageContent'
              - $ref: '#/components/schemas/ImageMessageContent'
              - $ref: '#/components/schemas/DocumentMessageContent'
              - $ref: '#/components/schemas/ToolUseRequestMessageContent'
              - $ref: '#/components/schemas/ReasoningMessageContent'
        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.
        stopReason:
          type: string
          description: The reason that the model stopped.
          enum:
            - TOOL_USE
            - MAX_TOKENS
            - STOP_SEQUENCE
            - END_TURN
            - CONTENT_FILTERED
            - SAFETY
            - UNKNOWN
        modelProviderUsage:
          $ref: '#/components/schemas/ModelProviderUsage'
          description: The token usage from the model provider.
    Message:
      type: object
      description: An individual message in a Messages API request or response.
      properties:
        content:
          type: array
          description: the list of content items that make up this message
          items:
            oneOf:
              - $ref: '#/components/schemas/DocumentMessageContent'
              - $ref: '#/components/schemas/ImageMessageContent'
              - $ref: '#/components/schemas/ReasoningMessageContent'
              - $ref: '#/components/schemas/TextMessageContent'
              - $ref: '#/components/schemas/ToolUseRequestMessageContent'
              - $ref: '#/components/schemas/ToolUseResultMessageContent'
        role:
          type: string
          description: the role of the message sender
          enum:
            - USER
            - ASSISTANT
      required:
        - content
    TextMessageContent:
      allOf:
        - $ref: '#/components/schemas/MessageContent'
        - type: object
          properties:
            text:
              type: string
              description: the text content of the message
      description: Text-based message content.
    JsonResponseFormat:
      allOf:
        - $ref: '#/components/schemas/ResponseFormat'
        - type: object
          properties:
            schema:
              $ref: '#/components/schemas/ObjectFunctionParameter'
              description: The JSON Schema to which the model response should adhere.
      description: >-
        JSON response format provides schema information to the model for use
        cases where structured output is desired.
         The schema object follows the <a href="https://json-schema.org/specification">JSON Schema</a> specification.
    ReasoningConfig:
      type: object
      properties:
        reasoningEffort:
          type: string
          enum:
            - NONE
            - LOW
            - MEDIUM
            - HIGH
    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.
    ToolUseRequestMessageContent:
      allOf:
        - $ref: '#/components/schemas/MessageContent'
        - type: object
          properties:
            toolInput:
              type: object
              additionalProperties: {}
              description: the input parameters for the tool
            name:
              type: string
              description: the name of the tool to execute
            toolCallId:
              type: string
              description: unique identifier for this tool call
      description: Tool use request message content.
      required:
        - name
        - toolCallId
        - toolInput
    ReasoningMessageContent:
      allOf:
        - $ref: '#/components/schemas/MessageContent'
        - type: object
          properties:
            text:
              type: string
              description: the reasoning/thinking text generated by the model
            signature:
              type: string
              description: optional signature for the reasoning content
      description: |-
        Reasoning (thinking) message content.
         Contains the model's internal reasoning process when extended thinking is enabled.
    ModelProviderUsage:
      type: object
      properties:
        inputTokens:
          type: integer
          format: int64
        outputTokens:
          type: integer
          format: int64
        totalTokens:
          type: integer
          format: int64
        reasoningTokens:
          type: integer
          format: int64
    ToolUseResultMessageContent:
      allOf:
        - $ref: '#/components/schemas/MessageContent'
        - type: object
          properties:
            toolCallId:
              type: string
              description: unique identifier for the tool call this result corresponds to
            content:
              type: array
              description: the result content from the tool execution
              items:
                description: The result content from the tool execution
                oneOf:
                  - $ref: '#/components/schemas/TextMessageContent'
        - type: object
          properties:
            toolCallId:
              type: string
              description: unique identifier for the tool call this result corresponds to
            content:
              type: array
              description: the result content from the tool execution
              items:
                description: The result content from the tool execution
                oneOf:
                  - $ref: '#/components/schemas/DocumentMessageContent'
                  - $ref: '#/components/schemas/ImageMessageContent'
                  - $ref: '#/components/schemas/ReasoningMessageContent'
                  - $ref: '#/components/schemas/TextMessageContent'
                  - $ref: '#/components/schemas/ToolUseRequestMessageContent'
                  - $ref: '#/components/schemas/ToolUseResultMessageContent'
                  - $ref: '#/components/schemas/TextMessageContent'
      description: Tool use result message content.
      required:
        - toolCallId
    MessageContent:
      description: Base interface for multi-modal message content
      discriminator:
        propertyName: type
      properties:
        type:
          type: string
      required:
        - type
    ResponseFormat:
      discriminator:
        propertyName: type
      properties:
        type:
          type: string
      required:
        - type
    ObjectFunctionParameter:
      allOf:
        - $ref: '#/components/schemas/FunctionParameterObject'
        - type: object
          properties:
            description:
              type: string
            title:
              type: string
            additionalProperties:
              type: boolean
            required:
              type: array
              items:
                type: string
            enum:
              type: array
              items:
                type: object
                additionalProperties: {}
              uniqueItems: true
            properties:
              type: object
              additionalProperties:
                oneOf:
                  - $ref: '#/components/schemas/ArrayFunctionParameter'
                  - $ref: '#/components/schemas/BooleanFunctionParameter'
                  - $ref: '#/components/schemas/IntegerFunctionParameter'
                  - $ref: '#/components/schemas/LogicalOperatorFunctionParameter'
                  - $ref: '#/components/schemas/NullFunctionParameter'
                  - $ref: '#/components/schemas/NumberFunctionParameter'
                  - $ref: '#/components/schemas/ObjectFunctionParameter'
                  - $ref: '#/components/schemas/StringFunctionParameter'
            minProperties:
              type: integer
              format: int32
            maxProperties:
              type: integer
              format: int32
            const:
              type: object
              additionalProperties: {}
      required:
        - properties
        - 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
    FunctionParameterObject:
      type: object
      properties:
        type:
          type: string
          enum:
            - object
            - array
            - string
            - number
            - integer
            - boolean
            - 'null'
            - unknown
            - oneOf
            - allOf
            - anyOf
        const: {}
        enum:
          type: array
          items: {}
          uniqueItems: true
      required:
        - type
    ArrayFunctionParameter:
      allOf:
        - $ref: '#/components/schemas/FunctionParameterObject'
        - type: object
          properties:
            description:
              type: string
            title:
              type: string
            items:
              oneOf:
                - $ref: '#/components/schemas/ArrayFunctionParameter'
                - $ref: '#/components/schemas/BooleanFunctionParameter'
                - $ref: '#/components/schemas/IntegerFunctionParameter'
                - $ref: '#/components/schemas/LogicalOperatorFunctionParameter'
                - $ref: '#/components/schemas/NullFunctionParameter'
                - $ref: '#/components/schemas/NumberFunctionParameter'
                - $ref: '#/components/schemas/ObjectFunctionParameter'
                - $ref: '#/components/schemas/StringFunctionParameter'
            enum:
              type: array
              items:
                type: array
                items: {}
              uniqueItems: true
            minItems:
              type: integer
              format: int32
            maxItems:
              type: integer
              format: int32
            uniqueItems:
              type: boolean
            const:
              type: array
              items: {}
      required:
        - description
        - type
    BooleanFunctionParameter:
      allOf:
        - $ref: '#/components/schemas/FunctionParameterObject'
        - type: object
          properties:
            description:
              type: string
            title:
              type: string
            const:
              type: boolean
            enum:
              type: array
              items:
                type: boolean
              uniqueItems: true
      required:
        - description
        - type
    IntegerFunctionParameter:
      allOf:
        - $ref: '#/components/schemas/FunctionParameterObject'
        - type: object
          properties:
            description:
              type: string
            title:
              type: string
            multipleOf:
              type: integer
              format: int32
            minimum:
              type: integer
              format: int32
            exclusiveMinimum:
              type: integer
              format: int32
            maximum:
              type: integer
              format: int32
            exclusiveMaximum:
              type: integer
              format: int32
            enum:
              type: array
              items:
                type: integer
                format: int32
              uniqueItems: true
            const:
              type: integer
              format: int32
      required:
        - description
        - type
    LogicalOperatorFunctionParameter:
      allOf:
        - $ref: '#/components/schemas/FunctionParameterObject'
        - type: object
          properties:
            description:
              type: string
            title:
              type: string
            oneOf:
              type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/ArrayFunctionParameter'
                  - $ref: '#/components/schemas/BooleanFunctionParameter'
                  - $ref: '#/components/schemas/IntegerFunctionParameter'
                  - $ref: '#/components/schemas/LogicalOperatorFunctionParameter'
                  - $ref: '#/components/schemas/NullFunctionParameter'
                  - $ref: '#/components/schemas/NumberFunctionParameter'
                  - $ref: '#/components/schemas/ObjectFunctionParameter'
                  - $ref: '#/components/schemas/StringFunctionParameter'
            allOf:
              type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/ArrayFunctionParameter'
                  - $ref: '#/components/schemas/BooleanFunctionParameter'
                  - $ref: '#/components/schemas/IntegerFunctionParameter'
                  - $ref: '#/components/schemas/LogicalOperatorFunctionParameter'
                  - $ref: '#/components/schemas/NullFunctionParameter'
                  - $ref: '#/components/schemas/NumberFunctionParameter'
                  - $ref: '#/components/schemas/ObjectFunctionParameter'
                  - $ref: '#/components/schemas/StringFunctionParameter'
            anyOf:
              type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/ArrayFunctionParameter'
                  - $ref: '#/components/schemas/BooleanFunctionParameter'
                  - $ref: '#/components/schemas/IntegerFunctionParameter'
                  - $ref: '#/components/schemas/LogicalOperatorFunctionParameter'
                  - $ref: '#/components/schemas/NullFunctionParameter'
                  - $ref: '#/components/schemas/NumberFunctionParameter'
                  - $ref: '#/components/schemas/ObjectFunctionParameter'
                  - $ref: '#/components/schemas/StringFunctionParameter'
      required:
        - description
        - type
    NullFunctionParameter:
      allOf:
        - $ref: '#/components/schemas/FunctionParameterObject'
        - type: object
          properties:
            description:
              type: string
            title:
              type: string
      required:
        - description
        - type
    NumberFunctionParameter:
      allOf:
        - $ref: '#/components/schemas/FunctionParameterObject'
        - type: object
          properties:
            description:
              type: string
            title:
              type: string
            multipleOf:
              type: number
              format: double
            minimum:
              type: number
              format: double
            exclusiveMinimum:
              type: number
              format: double
            maximum:
              type: number
              format: double
            exclusiveMaximum:
              type: number
              format: double
            enum:
              type: array
              items:
                type: number
                format: double
              uniqueItems: true
            const:
              type: number
              format: double
      required:
        - description
        - type
    StringFunctionParameter:
      allOf:
        - $ref: '#/components/schemas/FunctionParameterObject'
        - type: object
          properties:
            description:
              type: string
            title:
              type: string
            minLength:
              type: integer
              format: int32
            maxLength:
              type: integer
              format: int32
            pattern:
              type: string
            enum:
              type: array
              items:
                type: string
              uniqueItems: true
            format:
              type: string
            const:
              type: string
      required:
        - description
        - type
  securitySchemes:
    domo-developer-token:
      type: apiKey
      name: X-DOMO-Developer-Token
      in: header

````