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

# Create Call Summary

> Generates a summary and metrics for a completed call based on its transcription. This endpoint is idempotent; if a summary already exists, it will not be regenerated.



## OpenAPI

````yaml post /api/v1/call/create-summary
openapi: 3.0.3
info:
  title: Dialgen API
  description: >-
    Dialgen API allows you to programmatically initiate and monitor AI-powered
    voice calls, either one at a time or in high-volume batches.
  version: 1.0.0
  contact:
    name: Dialgen Support
    url: https://sa.dialgen.ai
servers:
  - url: https://sa.dialgen.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Operations related to AI agents
  - name: Calls
    description: Operations related to individual calls
  - name: Batches
    description: Operations related to batch campaigns
paths:
  /api/v1/call/create-summary:
    post:
      tags:
        - Calls
      summary: Create Call Summary
      description: >-
        Generates a summary and metrics for a completed call based on its
        transcription. This endpoint is idempotent; if a summary already exists,
        it will not be regenerated.
      operationId: createSummary
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSummaryRequest'
            example:
              callId: call_12345...
              transcription:
                - role: assistant
                  content: Hello, how can I help you today?
                - role: user
                  content: I'm interested in your pricing plans.
      responses:
        '200':
          description: Summary created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSummaryResponse'
              example:
                success: true
                summary: 150
                customMetricsProcessed: 3
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CreateSummaryRequest:
      type: object
      required:
        - callId
        - transcription
      properties:
        callId:
          type: string
        transcription:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
                enum:
                  - assistant
                  - user
              content:
                type: string
    CreateSummaryResponse:
      type: object
      properties:
        success:
          type: boolean
        summary:
          type: number
        customMetricsProcessed:
          type: number
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        message:
          type: string
        details:
          type: object
  responses:
    BadRequest:
      description: Missing or invalid fields/parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Bad Request
            message: Missing required parameter
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
            message: Invalid or missing API key
    InternalServerError:
      description: An unexpected server error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
            message: An unexpected error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token authentication. Obtain your API key from the Dialgen API
        Keys dashboard at https://sa.dialgen.ai/api-keys

````