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

# Get single audio classification result

> Retrieve the classification result for a specific audio.



## OpenAPI

````yaml get /api/classification_audio/{identifier}
openapi: 3.0.0
info:
  title: identifAI API
  version: 1.0.0
  description: >-
    API for integrating identifAI's image and video classification
    capabilities.<br><details><summary>**How to obtain your API
    Key**</summary>To obtain your API key, follow these simple steps:  
    <ol><li><p>**Create a user profile and log in to the platform**</p>If you
    don't have an account yet, visit our platform and create a user profile.
    Once you've completed registration and verified your email, log in with your
    credentials.</li><li><p>**Access the user menu**</p>After logging in, click
    on your name or the user icon in the top-right corner of the
    screen.</li><li><p>**Select the API Key option**</p>In the dropdown menu
    that appears, select the "API Key" option. From there, you can view or
    generate your API key.</li></ol>Now you are ready to use your API key in our
    API!</details><details><summary>**How to use the API**</summary>To use the
    API, first make a **POST** request to start the classification. Then, use
    the provided ***identifier*** from the **POST** request to retrieve the
    results.

    <details>

    <summary>**1. Image Classification**</summary>
      * To classify an image, you need to make a **POST** request to `/api/classification` with the required parameters (for details on the parameters, refer to the *"Classification"* section below).
      * In the response, you will receive the ***identifier*** of the classified image.
      * Use the provided ***identifier*** to retrieve the classification results by making a **GET** request to `/api/classification/{identifier}` (for details on how to structure this request, see the *"Classification"* section below).
      * The response will contain the classification results for the image in JSON format.<br>In the response, you will find a ***results*** array, which includes the classification results for each model used, and a ***verdicts*** array, which contains the results for each heuristic applied.<br>If the classification is not yet complete, continue sending the **GET** request until the result is available.</details><details><summary>**2. Video Classification**</summary>
        * To classify a video, you need to make a **POST** request to `/api/classification_video` with the required parameters (for details on the parameters, refer to the *"Classification"* section below).
        * In the response, you will receive the ***identifier*** of the classified video.
        * Use the provided ***identifier*** to retrieve the classification results by making a **GET** request to `/api/classification_video/{identifier}` (for details on how to structure this request, see the *"Classification"* section below).
        * The response will provide the classification results for the video in JSON format. For video classification, the video is divided into *frames*.<br> In the response, you will find a ***results*** array that includes the classification outcomes for each model applied to each analyzed frame, and a ***verdicts*** array containing the results for each heuristic used.<br> If the classification is not complete, continue sending the **GET** request until the final results are returned.</details><details><summary>**3. All Classifications**</summary>The `/api/classifications` endpoint will return all the image classifications made by a user. This will list the results of all past image classification requests.</details><details><summary>**4. User Management**</summary>  The **POST** `/api/user` endpoint allows you to create a user, while the **DELETE** `/api/user` endpoint is used to delete a user (For the structure of the requests, see more in the user section below).</details></details>
servers:
  - url: https://backend.identifai.net
security: []
tags:
  - name: Classification
    description: Classification routes
  - name: User
    description: User actions
  - name: Partner
    description: Partner actions
paths:
  /api/classification_audio/{identifier}:
    get:
      tags:
        - Classification
      summary: Get single audio classification result
      description: Retrieve the classification result for a specific audio.
      parameters:
        - name: identifier
          in: path
          required: true
          schema:
            type: string
          description: The identifier of the audio file.
      responses:
        '200':
          description: The classification result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioResponse'
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              example:
                error: Unauthorized
        '403':
          description: >-
            The specified identifier does not exist or is not accessible by the
            user.
          content:
            application/json:
              example:
                error: Forbidden
        '429':
          description: Too many requests.
          content:
            application/json:
              example:
                message: Too Many Attempts.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AudioResponse:
      type: object
      description: The answer for audio classification
      properties:
        hash:
          type: string
          description: SHA-256 hash of the classified audio file
        identifier:
          type: string
          description: The identifier that identifies the classified audio
        api_version:
          type: string
          nullable: true
          description: >-
            The API version at the time of the analysis (available from
            **v1.1.0**). The value is set when the analysis completes.
        status:
          $ref: '#/components/schemas/Status'
          description: >-
            The processing status of the classification request (available from
            **v1.1.0**)
        errors:
          type: string
          nullable: true
          description: >-
            Error messages if the status is 'errored' (available from
            **v1.1.0**)
        name:
          type: string
          description: The name of the classified audio file
        ref_id:
          type: string
          description: >-
            An optional reference ID to associate with the classification
            request.
        result_url:
          type: string
          format: uri
          description: URL where the classification results can be found on the dashboard
        verdict:
          $ref: '#/components/schemas/Verdict'
          description: The main classification verdict using the user's default heuristic
        verdicts:
          type: array
          items:
            $ref: '#/components/schemas/Verdict'
          description: Array of verdicts for all available heuristics
        force_classification:
          type: string
          enum:
            - human
            - artificial
          nullable: true
          description: >-
            If present, indicates that the user has forced the classification to
            the specified value
        results:
          type: array
          items:
            $ref: '#/components/schemas/Result'
          description: Detailed classification results from each AI detection model
        details:
          $ref: '#/components/schemas/MediaDetails'
          description: >-
            Per-segment details of the audio analysis, with each entry
            representing a clip extracted from the submitted audio
    Status:
      type: string
      enum:
        - new
        - done
        - errored
    Verdict:
      type: object
      description: The final classification response for the considered heuristic
      properties:
        models:
          type: array
          items:
            type: string
            description: Model name
          description: Array of models used
        heuristic:
          type: string
          description: >-
            Name of the heuristic used (e.g., 'Majority', 'Average',
            'AverageExcludeObsolete', 'TopRelevant')
        confidence:
          type: number
          description: The confidence of the classification result from 0 to 1
        classification:
          type: string
          enum:
            - human
            - artificial
          description: The final classification result using the specified heuristic
      required:
        - heuristic
        - confidence
        - classification
    Result:
      type: object
      description: >-
        The score obtained in each category (human or artificial) for the model
        used
      properties:
        model:
          type: string
          description: The name of the AI detection model used for classification
        unknown:
          type: boolean
          description: >-
            Indicates if the model couldn't confidently classify the image
            (uncertainty detected)
        elapsed_time:
          type: number
          description: The time taken for classification in seconds
        classification:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
                description: Category
                enum:
                  - human
                  - artificial
              score:
                type: number
                description: Score from 0 to 1
          description: Array of classification scores for each category
        classification_details:
          type: object
          description: Additional details about the classification process
    MediaDetails:
      type: object
      description: Container for per-segment analysis details
      properties:
        clips:
          type: array
          items:
            $ref: '#/components/schemas/ClipDetail'
          description: >-
            Array of analysis results for each segment (clip) extracted from the
            submitted media file
      required:
        - clips
    ClipDetail:
      type: object
      description: >-
        Detailed information about a specific clip (audio or video segment)
        analysis
      properties:
        index:
          type: integer
          description: The index of the clip in the sequence
        start:
          type: number
          description: Start time of the clip in seconds
        end:
          type: number
          description: End time of the clip in seconds
        results:
          type: array
          items:
            $ref: '#/components/schemas/Result'
          description: >-
            Detailed classification results from each AI detection model for
            this clip
        verdict:
          $ref: '#/components/schemas/Verdict'
          description: The classification verdict for this specific clip
      required:
        - index
        - start
        - end
        - results
        - verdict
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-Api-Key
      in: header
      description: Your API key.

````