> ## 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. To set STT options such as
                    `custom_terms`, include an `stt` key in the
                    JSON-encoded BatchConfig.
            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.
        '401':
          description: Unauthorized - the API key is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missing_api_key:
                  summary: API key header absent
                  value:
                    detail: Missing API key.
                invalid_api_key:
                  summary: API key not recognized
                  value:
                    detail: Invalid API key.
        '403':
          description: Forbidden - the request is not permitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                not_permitted:
                  summary: Request not permitted
                  value:
                    detail: This request is not permitted.
                model_access_denied:
                  summary: API key lacks access to this model
                  value:
                    detail: This API key does not have access to this model.
        '413':
          description: >-
            Payload too large - the uploaded file exceeds the maximum allowed
            size
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: The uploaded file is too large.
        '422':
          description: |
            Unprocessable Entity. Either the `config` value was rejected
            (invalid JSON, an invalid preset reference, or a definition
            missing a required field), returning an ErrorResponse body
            whose `detail` names the offending part of the config where
            possible; or a required request field was missing or
            the wrong type (for example, 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: >-
                    Configuration was rejected and no specific field could be
                    named
                  value:
                    detail: Invalid configuration.
                missing_required_field:
                  summary: A definition is missing a required field
                  value:
                    detail: 'behaviors.0.name: missing required field'
                unknown_preset:
                  summary: Unknown behavior preset reference
                  value:
                    detail: >-
                      behaviors.0: invalid behavior preset; use list-presets to
                      discover available presets
                missing_field:
                  summary: Missing or malformed required field
                  value:
                    detail:
                      - loc:
                          - body
                          - upload_file
                        msg: Field required
                        type: missing
        '429':
          description: >-
            Too many requests - insufficient credits or a usage limit was
            reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                insufficient_credits:
                  summary: Insufficient credits
                  value:
                    detail: Insufficient credits.
                concurrency_limit:
                  summary: Concurrent request limit reached
                  value:
                    detail: >-
                      Concurrent request limit reached. Please retry after your
                      in-flight requests complete.
                monthly_limit:
                  summary: Monthly usage limit reached
                  value:
                    detail: Monthly usage limit reached.
        '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 completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                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 no reading is
            available.
          oneOf:
            - type: string
            - type: 'null'
        accent:
          description: >-
            Predicted accent label for the clip, or null when no reading is
            available.
          oneOf:
            - type: string
            - type: 'null'
        deepfake_score:
          description: >-
            Synthetic voice detection score for the clip, or null when no
            reading is available.
          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:
          description: >-
            Clip UUIDs supporting the detection, drawn from this speaker's
            clips.
          type: array
          items:
            type: string
            format: uuid
        definitive_clip_uuid:
          description: >-
            UUID of a representative clip for this speaker, or null when
            unavailable.
          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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.