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

# Data Extraction - Beta

> Extract structured data from unstructured text according to a provided JSON schema.



## OpenAPI

````yaml /openapi/product/AI-Services.yaml post /api/ai/v1/extract
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/extract:
    post:
      tags:
        - AI Services - Data Extraction
      summary: Data Extraction - Beta
      description: >-
        Extract structured data from unstructured text according to a provided
        JSON schema.
      operationId: messagesExtractData
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtractDataRequest'
            examples:
              Basic Contact Extraction:
                description: Extract contact information from text using Messages API.
                value:
                  input:
                    - type: TEXT
                      text: >-
                        Contact: Sarah Johnson, email sarah.j@company.com, phone
                        (555) 123-4567
                  outputStructure:
                    name:
                      type: string
                      description: Full name
                    email:
                      type: string
                      description: Email address
                    phone:
                      type: string
                      description: Phone number
              Resume Extraction:
                description: >-
                  Extract structured data from a resume with nested fields using
                  Messages API.
                value:
                  input:
                    - type: TEXT
                      text: >-
                        John Smith

                        Senior Software Engineer

                        Email: john.smith@email.com | Phone: (555) 123-4567


                        Experience:

                        Tech Corp (2020-Present) - Led microservices
                        architecture serving 5M+ users

                        StartupXYZ (2016-2019) - Built RESTful APIs with Spring
                        Boot


                        Education: B.S. Computer Science, UC Berkeley, 2016

                        Skills: Java, Python, AWS, Docker, Kubernetes
                  outputStructure:
                    name:
                      type: string
                      description: Full name
                    title:
                      type: string
                      description: Job title
                    email:
                      type: string
                      description: Email address
                    phone:
                      type: string
                      description: Phone number
                    experience:
                      type: array
                      description: Work history
                      items:
                        type: object
                        properties:
                          company:
                            type: string
                            description: Company name
                          years:
                            type: string
                            description: Years worked
                          role:
                            type: string
                            description: Job description
                    education:
                      type: string
                      description: Educational background
                    skills:
                      type: array
                      description: Technical skills
                      items:
                        type: string
        required: true
      responses:
        '200':
          description: Successful extract data response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractDataResponse'
              examples:
                Extract Data Response:
                  description: Extract Data Response
                  value:
                    output:
                      name: John Smith
                      title: Senior Software Engineer
                      email: john.smith@email.com
                      phone: (555) 123-4567
                      experience:
                        - company: Tech Corp
                          years: 2020-Present
                          role: Led microservices architecture serving 5M+ users
                        - company: StartupXYZ
                          years: 2016-2019
                          role: Built RESTful APIs with Spring Boot
                      education: B.S. Computer Science, UC Berkeley, 2016
                      skills:
                        - Java
                        - Python
                        - AWS
                        - Docker
                        - Kubernetes
                    model: domo.domo_ai.domogpt-medium-v2.1:anthropic
                    isCustomerModel: false
                    requestId: 613f0d20-661a-48c4-a495-60cae524e8f6
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                type: string
        '409':
          description: Conflict
      security:
        - domo-developer-token: []
components:
  schemas:
    ExtractDataRequest:
      type: object
      description: >-
        Request for extracting structured data from unstructured text using the
        Messages API.

         <p>The ExtractData service uses LLM structured outputs to extract data
         conforming to a provided JSON schema from message content input.</p>
      properties:
        input:
          type: array
          description: >-
            The input message content to extract data from (text, images,
            documents, etc.)
          items:
            oneOf:
              - $ref: '#/components/schemas/TextMessageContent'
              - $ref: '#/components/schemas/ImageMessageContent'
              - $ref: '#/components/schemas/DocumentMessageContent'
        outputStructure:
          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'
          description: >-
            Map of field names to their FunctionParameter definitions. All
            fields are treated as required.
        instructions:
          type: string
          description: Optional instructions for extraction 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:
        - input
        - outputStructure
    ExtractDataResponse:
      type: object
      description: |-
        Response containing extracted structured data.

         <p>The output field contains a Map representation of the extracted data
         matching the schema provided in the request.</p>
      properties:
        output:
          type: object
          additionalProperties: {}
          description: The extracted structured data as a Map
        model:
          type: string
          description: The model ID used for extraction
        requestId:
          type: string
          format: uuid
          description: The request identifier
        isCustomerModel:
          type: boolean
          description: Whether a customer-provided model was used
        modelProviderUsage:
          $ref: '#/components/schemas/ModelProviderUsage'
      required:
        - output
    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.
    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
    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
    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
    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
    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
  securitySchemes:
    domo-developer-token:
      type: apiKey
      name: X-DOMO-Developer-Token
      in: header

````