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

# Summarize Transcript

> Generate or regenerate AI summary for a transcript.

Use this endpoint to:
- Get a fresh summary with custom parameters
- Regenerate a summary with different options
- Generate summary for transcripts that didn't have one

**Cost note**: Each call uses OpenAI API tokens.



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json post /agents/{agent_id}/transcripts/{session_id}/summarize
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /agents/{agent_id}/transcripts/{session_id}/summarize:
    post:
      tags:
        - agent-transcripts
      summary: Summarize Transcript
      description: |-
        Generate or regenerate AI summary for a transcript.

        Use this endpoint to:
        - Get a fresh summary with custom parameters
        - Regenerate a summary with different options
        - Generate summary for transcripts that didn't have one

        **Cost note**: Each call uses OpenAI API tokens.
      operationId: >-
        summarize_transcript_agents__agent_id__transcripts__session_id__summarize_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Session Id
        - name: include_sentiment
          in: query
          required: false
          schema:
            type: boolean
            description: Include sentiment analysis
            default: true
            title: Include Sentiment
          description: Include sentiment analysis
        - name: include_topics
          in: query
          required: false
          schema:
            type: boolean
            description: Extract main topics
            default: true
            title: Include Topics
          description: Extract main topics
        - name: include_action_items
          in: query
          required: false
          schema:
            type: boolean
            description: Extract action items
            default: true
            title: Include Action Items
          description: Extract action items
        - name: max_summary_length
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 50
            description: Maximum summary length in words
            default: 300
            title: Max Summary Length
          description: Maximum summary length in words
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AITranscriptSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AITranscriptSummary:
      properties:
        summary:
          type: string
          title: Summary
          description: Concise summary of the conversation
        sentiment:
          anyOf:
            - $ref: '#/components/schemas/SentimentAnalysis'
            - type: 'null'
          description: Sentiment analysis
        topics:
          items:
            type: string
          type: array
          title: Topics
          description: Main topics discussed
        action_items:
          items:
            type: string
          type: array
          title: Action Items
          description: Follow-up actions identified
        key_moments:
          items:
            type: string
          type: array
          title: Key Moments
          description: Key moments in the conversation
        outcome:
          anyOf:
            - type: string
            - type: 'null'
          title: Outcome
          description: 'Call outcome: resolved, escalated, etc.'
        call_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Call Type
          description: 'Type of call: support, sales, inquiry, etc.'
      type: object
      required:
        - summary
      title: AITranscriptSummary
      description: AI-generated transcript summary and analysis.
      example:
        action_items:
          - Send confirmation email
        call_type: support
        key_moments:
          - Agent offered a 10% credit which resolved the issue
        outcome: resolved
        sentiment:
          agent_performance: Agent handled the situation professionally
          customer_satisfaction: Customer was satisfied with the resolution
          overall: positive
          score: 0.7
        summary: >-
          Customer called about a billing issue. Agent resolved it by applying a
          credit.
        topics:
          - billing
          - account credit
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SentimentAnalysis:
      properties:
        overall:
          type: string
          title: Overall
          description: 'Overall sentiment: positive, neutral, negative, mixed'
        score:
          type: number
          title: Score
          description: Sentiment score from -1.0 (negative) to 1.0 (positive)
        customer_satisfaction:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Satisfaction
          description: Assessment of customer satisfaction
        agent_performance:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Performance
          description: Assessment of agent handling
      type: object
      required:
        - overall
        - score
      title: SentimentAnalysis
      description: AI-generated sentiment analysis.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````