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

# Control session lifecycle

> Control a live session: finalize processing, cancel, or extend TTL.



## OpenAPI

````yaml api-reference/openapi.json post /analyze/live/{session_id}/control
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:
  /analyze/live/{session_id}/control:
    post:
      tags:
        - Live Streaming
      summary: Control session lifecycle
      description: 'Control a live session: finalize processing, cancel, or extend TTL.'
      operationId: controlLiveSession
      parameters:
        - name: session_id
          in: path
          required: true
          description: Live session identifier
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LiveSessionControlRequest'
      responses:
        '200':
          description: Control action successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Unknown live session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Session already finalized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    LiveSessionControlRequest:
      type: object
      required:
        - action
      properties:
        action:
          type: string
          enum:
            - finalize
            - cancel
            - keepalive
          description: >-
            Control action: finalize stops ingest and moves to final processing
            stages; cancel emits an error event; keepalive extends the TTL
        reason:
          type: string
          description: Optional reason for the action
    Error:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Error message
          example: Invalid or missing API key
  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>

````