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

# Create Command From Thread

> Create a reusable command from a thread conversation via LLM.

Validates the thread, creates a Command record with generation_status='generating',
starts a background Temporal workflow to extract command content, and returns 202.



## OpenAPI

````yaml https://analyst.heyhumm.ai/api/openapi.json post /threads/{thread_id}/create-command
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/{thread_id}/create-command:
    post:
      tags:
        - threads
      summary: Create Command From Thread
      description: >-
        Create a reusable command from a thread conversation via LLM.


        Validates the thread, creates a Command record with
        generation_status='generating',

        starts a background Temporal workflow to extract command content, and
        returns 202.
      operationId: create_command_from_thread_threads__thread_id__create_command_post
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
            description: Thread ID
            title: Thread Id
          description: Thread ID
        - name: organization_id
          in: query
          required: true
          schema:
            type: string
            title: Organization Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCommandRequest'
      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:
    CreateCommandRequest:
      properties:
        name:
          type: string
          title: Name
      type: object
      required:
        - name
      title: CreateCommandRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````