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

# Segment conversation

> Expose segmentation as a standalone capability for previously analyzed calls.



## OpenAPI

````yaml api-reference/openapi.json post /segment/conversation
openapi: 3.1.0
info:
  title: Illocution Insights API
  description: >-
    Developer-facing guide for the conversation-intelligence platform that
    powers docs.illocution.ai. The FastAPI service (version 0.3.0) exposes REST
    and Server‑Sent Events (SSE) endpoints for uploading media, driving live
    sessions, and retrieving higher-level insights.
  version: 0.3.0
servers:
  - url: https://api.illocution.ai
    description: Production API server
security:
  - apiKeyAuth: []
paths:
  /segment/conversation:
    post:
      tags:
        - Segmentation
      summary: Segment conversation
      description: >-
        Expose segmentation as a standalone capability for previously analyzed
        calls.
      operationId: segmentConversation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SegmentationRequest'
      responses:
        '200':
          description: Segmentation complete
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentationResponse'
        '400':
          description: Bad request - missing timeline
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SegmentationRequest:
      type: object
      required:
        - timeline
      properties:
        timeline:
          type: array
          items:
            $ref: '#/components/schemas/TimelineEntry'
          description: Full timeline array from /analyze
        context:
          type: string
          description: >-
            Optional context for segmentation (e.g., "Highlight where trust
            improved")
    SegmentationResponse:
      type: object
      properties:
        segmentation:
          $ref: '#/components/schemas/ConversationSegmentation'
    Error:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Error message
          example: Invalid or missing API key
    TimelineEntry:
      type: object
      properties:
        utterance_id:
          type: string
        speaker:
          type: string
        t_start:
          type: number
          format: float
          description: Start time in seconds
        t_end:
          type: number
          format: float
          description: End time in seconds
        text:
          type: string
          description: Transcribed text
        asr_confidence:
          type: number
          format: float
        prosody:
          type: object
          description: Acoustic metrics (pitch/energy stats, pauses, spectral features)
        prosody_desc:
          type: string
          description: >-
            Natural-language descriptor (e.g., "COMMITTED, PASSIONATE,
            emphatic")
        emotion:
          type: object
          description: Full emotion analysis with PAD scores
        sentiment:
          type: object
        polarity:
          type: number
          format: float
        subjectivity:
          type: number
          format: float
        cognitive:
          type: object
          description: Cognitive analysis including engagement and load level
        commitment_score:
          type: number
          format: float
        commitment_level:
          type: string
        passion_score:
          type: number
          format: float
        passion_level:
          type: string
        conviction_score:
          type: number
          format: float
        lexical_markers:
          type: object
          description: Hedges, fillers, questions, disfluency rate, self-repair flags
        acoustic_reasoning:
          type: string
          description: Narrative explaining how acoustic cues map to cognition/emotion
        confidence:
          type: number
          format: float
          description: Average confidence across agents
    ConversationSegmentation:
      type: object
      properties:
        phases:
          type: array
          items:
            $ref: '#/components/schemas/ConversationPhase'
        total_phases:
          type: integer
        segmentation_rationale:
          type: string
        narrative_arc:
          type: string
        key_transitions:
          type: array
          items:
            $ref: '#/components/schemas/TransitionEvent'
    ConversationPhase:
      type: object
      properties:
        phase_id:
          type: string
        phase_name:
          type: string
        start_timestamp:
          type: number
          format: float
        end_timestamp:
          type: number
          format: float
        start_utterance_id:
          type: string
        end_utterance_id:
          type: string
        utterance_count:
          type: integer
        theme:
          type: string
        summary:
          type: string
        emotional_tone:
          type: string
        key_moments:
          type: array
          items:
            $ref: '#/components/schemas/MomentEvent'
        transition_signal:
          $ref: '#/components/schemas/TransitionEvent'
    TransitionEvent:
      type: object
      properties:
        transition_id:
          type: string
        at_ms:
          type: integer
          description: Timestamp in milliseconds
        from_state:
          type: object
        to_state:
          type: object
        evidence_utterance_ids:
          type: array
          items:
            type: string
        drivers:
          type: object
          description: Valence/arousal/engagement deltas
        confidence:
          type: number
          format: float
        stability:
          type: string
    MomentEvent:
      type: object
      properties:
        moment_id:
          type: string
        category:
          type: string
          enum:
            - objection
            - cta_offered
            - cta_accepted
            - cta_rejected
            - topic_shift
        speaker_id:
          type: string
        start_ms:
          type: integer
        end_ms:
          type: integer
        utterance_ids:
          type: array
          items:
            type: string
        summary:
          type: string
        labels:
          type: array
          items:
            type: string
        confidence:
          type: number
          format: float
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Can also be passed as query parameter:
        api_key=<client key>

````