> ## Documentation Index
> Fetch the complete documentation index at: https://docs.highailabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a message to Professor High AI assistant



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/chat
openapi: 3.1.0
info:
  title: High IQ API
  description: Cannabis intelligence API powering the High IQ mobile app and TIWIH website
  version: 1.0.0
servers:
  - url: https://api.thisiswhyimhigh.com
    description: Production
  - url: http://localhost:3001
    description: Local Development
security: []
tags:
  - name: Strains
    description: Strain database search, filtering, and retrieval
  - name: Scanner
    description: Cannabis label scanning with AI vision
  - name: Receipts
    description: Receipt parsing with AI
  - name: Notebooks
    description: AI-generated notebook streaming (SSE)
  - name: Discover
    description: High Families and curated highlight lists
  - name: Blog
    description: Blog article listing and retrieval
  - name: Research
    description: Research articles and menu extraction
  - name: Research Papers
    description: Cannabis research paper database
  - name: Deep Research
    description: AI-powered deep cannabis research
  - name: Meta
    description: System metadata and freshness signals
  - name: Chat
    description: Professor High AI cannabis assistant
  - name: Dispensaries
    description: Dispensary metadata such as crowdsourced email domains
  - name: Hero Images
    description: AI hero image generation and management for landing/content pages
  - name: Mascot
    description: Professor High mascot image generation and status (admin)
  - name: Shopping
    description: Dispensary shopping menus, scans, and strain matching
  - name: Social
    description: Social content drafts and stats for Professor High channels
  - name: App Landing
    description: High IQ app landing page content and configuration
paths:
  /api/v1/chat:
    post:
      tags:
        - Chat
      summary: Send a message to Professor High AI assistant
      operationId: postApiV1Chat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                messages:
                  minItems: 1
                  maxItems: 200
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        maxLength: 256
                      role:
                        type: string
                        enum:
                          - user
                          - assistant
                      parts:
                        maxItems: 64
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: text
                                text:
                                  type: string
                                state:
                                  type: string
                                  enum:
                                    - streaming
                                    - done
                                providerMetadata: {}
                              required:
                                - type
                                - text
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: reasoning
                                text:
                                  type: string
                                state:
                                  type: string
                                  enum:
                                    - streaming
                                    - done
                                providerMetadata: {}
                              required:
                                - type
                                - text
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: file
                                mediaType:
                                  type: string
                                  enum:
                                    - image/jpeg
                                    - image/png
                                    - image/webp
                                filename:
                                  type: string
                                  maxLength: 255
                                url:
                                  type: string
                                  maxLength: 9437184
                                providerReference:
                                  type: object
                                  propertyNames:
                                    type: string
                                    maxLength: 64
                                  additionalProperties:
                                    type: string
                                    minLength: 1
                                    maxLength: 2048
                                providerMetadata: {}
                                tiwihAttachmentOmitted:
                                  type: boolean
                              required:
                                - type
                                - mediaType
                                - url
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: source-url
                                sourceId:
                                  type: string
                                  maxLength: 256
                                url:
                                  type: string
                                  maxLength: 4096
                                  format: uri
                                title:
                                  type: string
                                  maxLength: 512
                                providerMetadata: {}
                              required:
                                - type
                                - sourceId
                                - url
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: source-document
                                sourceId:
                                  type: string
                                  maxLength: 256
                                mediaType:
                                  type: string
                                  minLength: 1
                                  maxLength: 128
                                title:
                                  type: string
                                  minLength: 1
                                  maxLength: 512
                                filename:
                                  type: string
                                  maxLength: 255
                                providerMetadata: {}
                              required:
                                - type
                                - sourceId
                                - mediaType
                                - title
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: step-start
                              required:
                                - type
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  pattern: ^tool-[A-Za-z][A-Za-z0-9_-]{0,63}$
                                toolCallId:
                                  type: string
                                  maxLength: 256
                                title:
                                  type: string
                                  maxLength: 256
                                toolMetadata: {}
                                providerExecuted:
                                  type: boolean
                                state:
                                  type: string
                                  enum:
                                    - input-streaming
                                    - input-available
                                    - approval-requested
                                    - approval-responded
                                    - output-available
                                    - output-error
                                    - output-denied
                                input: {}
                                rawInput: {}
                                output: {}
                                errorText:
                                  type: string
                                  maxLength: 16384
                                callProviderMetadata: {}
                                resultProviderMetadata: {}
                                preliminary:
                                  type: boolean
                                approval:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      maxLength: 256
                                    approved:
                                      type: boolean
                                    reason:
                                      type: string
                                      maxLength: 2048
                                    isAutomatic:
                                      type: boolean
                                    signature:
                                      type: string
                                      maxLength: 4096
                                  required:
                                    - id
                                  additionalProperties: false
                              required:
                                - type
                                - toolCallId
                                - state
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: dynamic-tool
                                toolCallId:
                                  type: string
                                  maxLength: 256
                                title:
                                  type: string
                                  maxLength: 256
                                toolMetadata: {}
                                providerExecuted:
                                  type: boolean
                                state:
                                  type: string
                                  enum:
                                    - input-streaming
                                    - input-available
                                    - approval-requested
                                    - approval-responded
                                    - output-available
                                    - output-error
                                    - output-denied
                                input: {}
                                rawInput: {}
                                output: {}
                                errorText:
                                  type: string
                                  maxLength: 16384
                                callProviderMetadata: {}
                                resultProviderMetadata: {}
                                preliminary:
                                  type: boolean
                                approval:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      maxLength: 256
                                    approved:
                                      type: boolean
                                    reason:
                                      type: string
                                      maxLength: 2048
                                    isAutomatic:
                                      type: boolean
                                    signature:
                                      type: string
                                      maxLength: 4096
                                  required:
                                    - id
                                  additionalProperties: false
                                toolName:
                                  type: string
                                  minLength: 1
                                  maxLength: 64
                                  pattern: ^[A-Za-z][A-Za-z0-9_-]*$
                              required:
                                - type
                                - toolCallId
                                - state
                                - toolName
                              additionalProperties: false
                      content:
                        type: string
                    required:
                      - role
                    additionalProperties: false
                userId:
                  type: string
                  minLength: 1
                  maxLength: 256
              required:
                - messages
                - userId
              additionalProperties: false
      responses:
        '200':
          description: AI SDK streaming chat response (UI Message Stream v1)
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  data: {}
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          limit:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          offset:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          total:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          hasMore:
                            type: boolean
                        required:
                          - limit
                          - offset
                          - total
                      timestamp:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      requestId:
                        type: string
                    additionalProperties: {}
                required:
                  - success
                  - data
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                      stack:
                        type: string
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      requestId:
                        type: string
                      path:
                        type: string
                      method:
                        type: string
                required:
                  - success
                  - error
        '402':
          description: Pro subscription required
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                      stack:
                        type: string
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      requestId:
                        type: string
                      path:
                        type: string
                      method:
                        type: string
                required:
                  - success
                  - error
        '503':
          description: AI features are disabled

````