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

# Velma Batch

> Run full conversation analysis on an uploaded audio file — transcription, conversation type, participant roles, behaviors, topics, sentiment, and summary in one response.



## OpenAPI

````yaml api/velma_2_batch.yaml POST /api/velma-2-batch
openapi: 3.1.0
info:
  title: Modulate Velma-2 Batch Server
  version: 0.0.0
  description: |
    Batch endpoint for the velma-2 service. Accepts a multipart upload with an
    audio file and a JSON `config` blob describing the conversation types,
    participant roles, and behaviors to use for analysis. Returns the full
    transcribed-and-analyzed conversation in one response (clips,
    conversation-type pick, participant-role picks, behaviors, topics, topic
    sentiments, and an optional summary).
servers:
  - url: https://platform.modulate.ai
    description: Modulate Velma-2 Batch Server
security:
  - ApiKeyAuth: []
paths:
  /api/velma-2-batch:
    post:
      summary: Run velma-2 batch analysis on an uploaded audio file.
      operationId: velma2Batch
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - upload_file
              properties:
                upload_file:
                  type: string
                  format: binary
                  description: |
                    Audio file. Max 100 MB. Supported extensions: aac, aiff,
                    flac, mp3, mp4, mov, ogg, opus, wav, webm.
                config:
                  type: string
                  default: default
                  contentMediaType: application/json
                  contentSchema:
                    $ref: '#/components/schemas/BatchConfig'
                  description: |
                    Either the literal string `default` (which loads a
                    built-in default configuration) or a JSON-encoded
                    BatchConfig object (whose structure is given by
                    `contentSchema`). When omitted the default
                    configuration is used. Sent as a string form field
                    because multipart/form-data has no first-class object
                    type.
            encoding:
              upload_file:
                contentType: application/octet-stream
              config:
                contentType: application/json
      responses:
        '200':
          description: Batch processing completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResponse'
        '400':
          description: |
            Bad request - The submitted audio was rejected: an unsupported file
            extension, an empty file, or a request that could not be processed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_format:
                  summary: Invalid file format
                  value:
                    detail: >-
                      Unsupported file format. Supported formats: .aac, .aiff,
                      .flac, .mov, .mp3, .mp4, .ogg, .opus, .wav, .webm.
                empty_file:
                  summary: Empty file
                  value:
                    detail: The uploaded file is empty.
                bad_value:
                  summary: Malformed request value
                  value:
                    detail: Invalid request.
        '403':
          description: Forbidden - the request is not permitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: This request is not permitted.
        '422':
          description: |
            Unprocessable Entity. Either the `config` value was malformed
            (invalid JSON, an invalid preset reference, or a definition
            missing a required field), returning an
            ErrorResponse body; or a required request field was missing or
            the wrong type (for example, the `X-API-Key` header or the
            `upload_file` part), returning the framework HTTPValidationError
            body.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/HTTPValidationError'
              examples:
                invalid_config:
                  summary: Invalid config value
                  value:
                    detail: Invalid configuration.
                missing_field:
                  summary: Missing or malformed required field
                  value:
                    detail:
                      - loc:
                          - header
                          - x-api-key
                        msg: Field required
                        type: missing
        '429':
          description: >-
            Too many requests - the request could not be completed due to
            insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: Insufficient credits.
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: Internal server error
        '502':
          description: Bad gateway - the request could not be validated or completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                validation_unavailable:
                  summary: Request could not be validated
                  value:
                    detail: Unable to validate request. Please try again.
                request_not_completed:
                  summary: Request could not be completed
                  value:
                    detail: Unable to complete the request. Please try again.
components:
  schemas:
    BatchResponse:
      type: object
      required:
        - duration_ms
        - clips
        - behaviors
      properties:
        duration_ms:
          type: integer
          minimum: 0
        clips:
          type: array
          items:
            $ref: '#/components/schemas/Clip'
        conversation_type_pick:
          oneOf:
            - $ref: '#/components/schemas/ConversationTypePick'
            - type: 'null'
        participant_role_picks:
          type: array
          items:
            $ref: '#/components/schemas/ParticipantRolePick'
        behaviors:
          type: array
          items:
            $ref: '#/components/schemas/BehaviorDetection'
        topics:
          type: array
          items:
            type: string
        topic_sentiments:
          type: array
          items:
            $ref: '#/components/schemas/TopicSentiment'
        summary:
          oneOf:
            - type: string
            - type: 'null'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Human-readable error message describing what went wrong
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    Clip:
      type: object
      required:
        - clip_uuid
        - text
        - start_ms
        - duration_ms
        - speaker_label
        - language
      properties:
        clip_uuid:
          type: string
          format: uuid
        text:
          type: string
        start_ms:
          type: integer
          minimum: 0
        duration_ms:
          type: integer
          minimum: 0
        speaker_label:
          type: string
        language:
          type: string
        emotion:
          description: >-
            Predicted emotion label for the clip, or null when the emotion
            signal is not enabled for the request.
          oneOf:
            - type: string
            - type: 'null'
        accent:
          description: >-
            Predicted accent label for the clip, or null when the accent signal
            is not enabled for the request.
          oneOf:
            - type: string
            - type: 'null'
        deepfake_score:
          oneOf:
            - type: number
              format: double
              minimum: 0
              maximum: 1
            - type: 'null'
    ConversationTypePick:
      type: object
      required:
        - conversation_type_uuid
        - name
        - confidence
        - selection_source
        - detail
      properties:
        conversation_type_uuid:
          type: string
          format: uuid
        name:
          type: string
        confidence:
          type: number
          format: double
          minimum: 0
          maximum: 1
        selection_source:
          $ref: '#/components/schemas/SelectionSource'
        detail:
          type: string
        reasoning:
          oneOf:
            - type: string
            - type: 'null'
    ParticipantRolePick:
      type: object
      required:
        - speaker_label
        - participant_role_uuid
        - name
        - confidence
        - selection_source
        - detail
      properties:
        speaker_label:
          type: string
        participant_role_uuid:
          type: string
          format: uuid
        name:
          type: string
        confidence:
          type: number
          format: double
          minimum: 0
          maximum: 1
        selection_source:
          $ref: '#/components/schemas/SelectionSource'
        detail:
          type: string
        reasoning:
          oneOf:
            - type: string
            - type: 'null'
    BehaviorDetection:
      type: object
      required:
        - behavior_uuid
        - behavior_name
        - speaker_label
        - detected
      properties:
        behavior_uuid:
          type: string
          format: uuid
        behavior_name:
          type: string
        speaker_label:
          oneOf:
            - type: string
            - type: 'null'
        detected:
          type: boolean
        confidence:
          oneOf:
            - type: number
              format: double
              minimum: 0
              maximum: 1
            - type: 'null'
        evidence_clip_uuids:
          type: array
          items:
            type: string
            format: uuid
        definitive_clip_uuid:
          oneOf:
            - type: string
              format: uuid
            - type: 'null'
        reasoning:
          oneOf:
            - type: string
            - type: 'null'
    TopicSentiment:
      type: object
      required:
        - topic
        - speaker_label
        - sentiment_score
        - sentiment_label
      properties:
        topic:
          type: string
        speaker_label:
          type: string
        sentiment_score:
          type: number
          format: double
          minimum: -1
          maximum: 1
        sentiment_label:
          type: string
    ValidationError:
      type: object
      required:
        - loc
        - msg
        - type
      properties:
        loc:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          type: string
        type:
          type: string
    SelectionSource:
      type: string
      enum:
        - inferred
        - auto_selected_single_option
        - default
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key used for authentication and usage tracking.

````