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

# Start Thread

> Starts an AI analysis in the background and returns immediately with thread metadata.
This endpoint enables polling-based UI updates by starting agent execution
in the background and returning thread information immediately.

Supports model configuration via the llm_config parameter (defaults to "deep" if not provided).



## OpenAPI

````yaml https://analyst.heyhumm.ai/api/openapi.json post /threads/async
openapi: 3.1.0
info:
  title: Analyst API
  description: API for the Analyst service with proper organization-scoped permissions
  version: 1.0.0
servers:
  - url: https://analyst.heyhumm.ai
security: []
paths:
  /threads/async:
    post:
      tags:
        - threads
      summary: Start Thread
      description: >-
        Starts an AI analysis in the background and returns immediately with
        thread metadata.

        This endpoint enables polling-based UI updates by starting agent
        execution

        in the background and returning thread information immediately.


        Supports model configuration via the llm_config parameter (defaults to
        "deep" if not provided).
      operationId: start_thread_threads_async_post
      parameters:
        - name: internal_user_id
          in: query
          required: false
          schema:
            type: string
            description: Override user ID for system operations (optional)
            title: Internal User Id
          description: Override user ID for system operations (optional)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ChatRequest:
      properties:
        query:
          type: string
          title: Query
          default: ''
        organization_id:
          type: string
          title: Organization Id
        thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Thread Id
        llm_config:
          anyOf:
            - $ref: '#/components/schemas/ModelConfig'
            - type: 'null'
        user_timezone:
          anyOf:
            - type: string
            - type: 'null'
          title: User Timezone
        images:
          anyOf:
            - items:
                $ref: '#/components/schemas/ImageInput'
              type: array
            - type: 'null'
          title: Images
        file_uploads:
          anyOf:
            - items:
                $ref: '#/components/schemas/FileUploadMetadata'
              type: array
            - type: 'null'
          title: File Uploads
        force_architecture:
          anyOf:
            - type: string
              enum:
                - monolith
                - sandbox
                - deepagents
            - type: 'null'
          title: Force Architecture
        source:
          anyOf:
            - type: string
              enum:
                - typed
                - suggestion
            - type: 'null'
          title: Source
        idempotency_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Idempotency Key
      additionalProperties: false
      type: object
      required:
        - organization_id
      title: ChatRequest
      description: Request model for async chat endpoint.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ModelConfig:
      properties:
        auto_config:
          anyOf:
            - type: string
              enum:
                - fast
                - deep
            - type: 'null'
          title: Auto Config
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        reasoning_effort:
          anyOf:
            - type: string
              enum:
                - none
                - minimal
                - low
                - medium
                - high
            - type: 'null'
          title: Reasoning Effort
        fallback_models:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Fallback Models
        provider:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Provider
        verbosity:
          anyOf:
            - type: string
              enum:
                - low
                - medium
                - high
            - type: 'null'
          title: Verbosity
        backend_streaming:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Backend Streaming
      type: object
      title: ModelConfig
      description: Configuration for model selection and reasoning effort.
    ImageInput:
      properties:
        data_url:
          type: string
          title: Data Url
        mime_type:
          type: string
          enum:
            - image/png
            - image/jpeg
            - image/gif
            - image/webp
          title: Mime Type
        detail:
          type: string
          enum:
            - auto
            - low
            - high
            - original
          title: Detail
          default: auto
      additionalProperties: false
      type: object
      required:
        - data_url
        - mime_type
      title: ImageInput
      description: Validated image input with hardened security checks.
    FileUploadMetadata:
      properties:
        cache_key:
          type: string
          title: Cache Key
        filename:
          type: string
          title: Filename
        sheet_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Sheet Name
        columns:
          items:
            $ref: '#/components/schemas/FileUploadColumn'
          type: array
          title: Columns
        row_count:
          type: integer
          title: Row Count
        preview_rows:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Preview Rows
      additionalProperties: false
      type: object
      required:
        - cache_key
        - filename
        - columns
        - row_count
      title: FileUploadMetadata
      description: >-
        Metadata for a single cached DataFrame from an uploaded file.


        Returned by the /api/upload endpoint after parsing and caching a file.

        Passed back in ChatRequest so the agent gets notified about uploaded
        data.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    FileUploadColumn:
      properties:
        name:
          type: string
          title: Name
        dtype:
          type: string
          title: Dtype
      additionalProperties: false
      type: object
      required:
        - name
        - dtype
      title: FileUploadColumn
      description: Column schema info from a parsed uploaded file.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````