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

# AI-voice detection

> Detect whether audio clips are human (`bonafide`) or AI-generated (`spoofed`) and get segment-level confidence scores.

**Designed for quick checks**
- Supported formats: WAV, MP3, AAC, FLAC, OGG, M4A, MP4, MOV, AVI, MKV

**Two ways to send audio**
1. `multipart/form-data` upload with a `file`
2. `application/json` payload with a `presigned_url`

The API automatically analyzes the audio in ~5-second segments and returns both a global verdict and detailed per-segment results.



## OpenAPI

````yaml /api-reference/v1/openapi.json post /predict
openapi: 3.0.3
info:
  title: Aurigin API
  version: 1.0.0
  description: Updated API with new response structure - v1.0.0
servers:
  - url: https://api.aurigin.ai/v1
security: []
paths:
  /predict:
    post:
      tags:
        - v1
      summary: AI-voice detection
      description: >-
        Detect whether audio clips are human (`bonafide`) or AI-generated
        (`spoofed`) and get segment-level confidence scores.


        **Designed for quick checks**

        - Supported formats: WAV, MP3, AAC, FLAC, OGG, M4A, MP4, MOV, AVI, MKV


        **Two ways to send audio**

        1. `multipart/form-data` upload with a `file`

        2. `application/json` payload with a `presigned_url`


        The API automatically analyzes the audio in ~5-second segments and
        returns both a global verdict and detailed per-segment results.
      operationId: predictV1
      requestBody:
        required: true
        description: >-
          Provide either a direct file upload or a presigned URL. Include
          `device` to tag the caller and optionally choose a `model`.
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                device:
                  type: string
                  description: Optional device type making the request
                  enum:
                    - macos
                    - windows
                    - web_app
                    - api
                model:
                  type: string
                  description: >-
                    Optional model version to run. Defaults to the latest
                    available model (`apollo-4-5-2026-03-26`).
                    `apollo-4-2026-01-16` remains available for backwards
                    compatibility.
                  enum:
                    - apollo-4-5-2026-03-26
                    - apollo-4-2026-01-16
                  nullable: true
                prediction_id:
                  type: string
                  description: Optional custom prediction identifier
                silence_threshold:
                  type: number
                  description: >-
                    Maximum silence percentage allowed per segment before it is
                    skipped (0.0-100.0). Segments where silence exceeds this
                    threshold are excluded from model inference. Lower values
                    are stricter (skip more segments); higher values are more
                    permissive. Set to `100` to analyze virtually all segments
                    regardless of silence.
                  default: 80
                  minimum: 0
                  maximum: 100
                threshold:
                  type: number
                  description: >-
                    Decision threshold for classifying audio as bonafide or
                    spoofed (0.0-1.0). Lower values bias toward higher spoof
                    detection; higher values reduce false positives. Confidence
                    scores are derived from how far the raw score is from this
                    threshold.
                  default: 0.5
                  minimum: 0
                  maximum: 1
              required:
                - file
            example:
              file: (binary audio file)
              device: api
              model: apollo-4-5-2026-03-26
              threshold: 0.5
          application/json:
            schema:
              $ref: '#/components/schemas/PredictRequest'
            example:
              presigned_url: https://example.com/presigned.wav
              device: api
              model: apollo-4-5-2026-03-26
              threshold: 0.5
      responses:
        '200':
          description: Global verdict plus per-segment predictions and confidence scores.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictResponse'
              examples:
                spoofed:
                  summary: Spoofed audio detected
                  value:
                    prediction_id: pred_9b6ff057a7f7
                    global:
                      score: 0.975
                      confidence: 0.95
                      result: spoofed
                      reason: null
                    segments:
                      - start: 0
                        end: 5
                        scores:
                          - 0.98
                        confidence: 0.96
                        result: spoofed
                      - start: 5
                        end: 10
                        scores:
                          - 0.97
                        confidence: 0.94
                        result: spoofed
                    model: apollo-4-5-2026-03-26
                    processing_time: 1.23
                    audio_duration: 10
                    warnings: []
                bonafide:
                  summary: Authentic audio
                  value:
                    prediction_id: pred_abc123def456
                    global:
                      score: 0.04
                      confidence: 0.92
                      result: bonafide
                      reason: null
                    segments:
                      - start: 0
                        end: 5
                        scores:
                          - 0.045
                        confidence: 0.91
                        result: bonafide
                      - start: 5
                        end: 8.5
                        scores:
                          - 0.035
                        confidence: 0.93
                        result: bonafide
                    model: apollo-4-5-2026-03-26
                    processing_time: 0.87
                    audio_duration: 8.5
                    warnings: []
        '400':
          description: Validation error (for example, unsupported format).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: validation_error
                message: Unsupported audio format
                status: 400
                correlation_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: unauthorized
                message: Invalid or inactive API key
                status: 401
                correlation_id: 8b738992-c4eb-4f19-870a-900e6830d147
        '413':
          description: Payload too large (over 5 MB).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: payload_too_large
                message: Request body exceeds maximum allowed size of 5MB
                status: 413
                correlation_id: 7f629881-a3db-5e28-761b-811f7940c258
        '422':
          description: The audio could not be processed (for example, corrupted media).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: unsupported_format
                message: Provided audio format is not supported
                status: 422
                correlation_id: 48cd2c61-9cbe-4761-8a8f-f65aabbd22b9
        '500':
          description: Unexpected server error while running the prediction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: processing_failed
                message: Internal error occurred while analyzing audio
                status: 500
                correlation_id: 1dd6c5a3-bda8-4de6-9171-e14d8d31c88e
        '503':
          description: Service temporarily unavailable — retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: service_unavailable
                message: >-
                  Service temporarily unavailable, retry with exponential
                  backoff
                status: 503
                correlation_id: 5f4f28d6-78f4-4202-a49f-96ce7390d5d1
      security:
        - api_key: []
      externalDocs:
        description: Guided walkthrough and code samples
        url: https://docs.aurigin.ai/api-reference/v1/endpoint/predict
components:
  schemas:
    PredictRequest:
      type: object
      properties:
        user_id:
          type: string
          description: Optional user identifier
        presigned_url:
          type: string
          description: Presigned URL to the audio file
        device:
          type: string
          description: Optional device type making the request
          enum:
            - macos
            - windows
            - web_app
            - api
        model:
          type: string
          description: >-
            Optional model version to run. Defaults to the latest available
            model (`apollo-4-5-2026-03-26`).
          enum:
            - apollo-4-5-2026-03-26
            - apollo-4-2026-01-16
        silence_threshold:
          type: number
          description: >-
            Maximum silence percentage allowed per segment before it is skipped
            (0.0-100.0). Segments where silence exceeds this threshold are
            excluded from model inference. Lower values are stricter (skip more
            segments); higher values are more permissive. Set to `100` to
            analyze virtually all segments regardless of silence.
          default: 80
          minimum: 0
          maximum: 100
        threshold:
          type: number
          description: >-
            Decision threshold for classifying audio as bonafide or spoofed
            (0.0-1.0). Lower values bias toward higher spoof detection; higher
            values reduce false positives. Confidence scores are derived from
            how far the raw score is from this threshold.
          default: 0.5
          minimum: 0
          maximum: 1
      required:
        - presigned_url
    PredictResponse:
      type: object
      properties:
        prediction_id:
          type: string
          description: Unique identifier for this prediction
        global:
          type: object
          properties:
            score:
              type: number
              format: float
              description: >-
                Raw probabilistic score (0.0-1.0). 0 indicates bonafide, 1
                indicates spoofed.
              minimum: 0
              maximum: 1
            confidence:
              type: number
              format: float
              description: >-
                Overall confidence score for the entire audio file (0.0-1.0),
                derived from how far the score is from the decision threshold
            result:
              type: string
              enum:
                - bonafide
                - spoofed
                - partially_spoofed
              description: Overall classification result for the entire audio file
            reason:
              type: string
              nullable: true
              description: Optional reason or explanation for the result
        segments:
          type: array
          items:
            type: object
            properties:
              start:
                type: number
                format: float
                description: Start time of the segment in seconds
              end:
                type: number
                format: float
                description: End time of the segment in seconds
              scores:
                type: array
                items:
                  type: number
                  format: float
                description: >-
                  Array of raw probabilistic scores for the sub-segments
                  aggregated into this segment (each 0.0-1.0). 0 indicates
                  bonafide, 1 indicates spoofed. Multiple values appear when
                  several sub-segments are combined into one segment.
              confidence:
                type: number
                format: float
                description: >-
                  Confidence score for this segment (0.0-1.0), derived from how
                  far the score is from the decision threshold
              result:
                type: string
                enum:
                  - bonafide
                  - spoofed
                description: Classification result for this segment
          description: >-
            Array of segment-level predictions. Each segment represents a
            5-second window of the audio.
        model:
          type: string
          description: Model version used for prediction
        processing_time:
          type: number
          format: float
          description: Time taken to process the audio in seconds
        audio_duration:
          type: number
          format: float
          description: Duration of the audio file in seconds
        warnings:
          type: array
          items:
            type: string
          description: Array of warning messages, if any
      example:
        prediction_id: pred_c3f91c4e10f3
        global:
          score: 0.49742
          confidence: 0.34647911317705393
          result: partially_spoofed
          reason: null
        segments:
          - start: 0
            end: 5
            scores:
              - 0.00001
            confidence: 0.000006612953711737646
            result: bonafide
          - start: 5
            end: 10
            scores:
              - 0.99484
            confidence: 0.9948440790176392
            result: spoofed
        model: apollo-4-5-2026-03-26
        processing_time: 11.55466890335083
        audio_duration: 41.51
        warnings: []
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Machine-readable error identifier
          example: validation_error
        message:
          type: string
          description: Human-readable explanation of the error
          example: Unsupported audio format
        status:
          type: integer
          description: HTTP status code associated with the error
          example: 400
        correlation_id:
          type: string
          description: Unique identifier for tracing failed requests
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key

````