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

# POST - Class Track Analysis

>  This API enables authenticated users to **submit class-level audio recordings** for comprehensive AI-powered analysis and evaluation using CrazyGoldFish AI technology. The endpoint performs thorough validation of audio links, securely stores educational metadata, and initiates a processing workflow for transcript generation and rubric-based AI evaluation.
For metadata ID references, please consult the [Metadata API Documentation](https://docs.crazygoldfish.com/api-reference/endpoint/metadata/boards).


 **Key Capabilities:** 
 - **Secure Audio Validation**: Accepts only publicly accessible HTTPS URLs pointing to .mp3 audio files 
 - **Comprehensive Metadata Management**: Captures and stores institutional, teacher, board, grade, subject, and rubric information 
 - **Flexible Rubric Integration**: Supports both UUID and integer-based rubric identifier formats


 **Typical Use Case: Submitting a Classroom Recording for AI Analysis** 
 - An educator uploads a classroom recording to a public cloud storage service and obtains a secure HTTPS URL 
 - The teacher submits the audio URL along with comprehensive class metadata including board, grade, subject, and rubric details 
 - The system performs rigorous validation of both URL format and metadata completeness before initiating processing 
 - Upon successful validation, the system returns a unique analysis identifier for tracking the evaluation progress


 <Warning> Only publicly accessible HTTPS URLs ending with .mp3 file extensions are accepted. Private URLs, non-HTTPS links, or unsupported file formats will result in validation errors and request rejection. </Warning> 



## OpenAPI

````yaml POST /class-track/v1/analysis
openapi: 3.0.1
info:
  title: Class Track Analysis API
  description: >-
    An API for submitting class-level audio tracks for AI-based analysis and
    evaluation.
  version: 1.0.0
servers:
  - url: https://api-staging.crazygoldfish.com
    description: SandBox endpoint
  - url: https://api.crazygoldfish.com
    description: Prod End Point
security: []
paths:
  /class-track/v1/analysis:
    post:
      summary: Create Class Track Analysis
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                institution_id:
                  type: string
                  description: Institution ID (optional)
                  example: inst_12345
                teacher_id:
                  type: string
                  description: Teacher ID (required)
                  example: teacher_67890
                board_id:
                  type: string
                  format: uuid
                  description: Board UUID (required)
                  example: 550e8400-e29b-41d4-a716-446655440000
                grade_id:
                  type: string
                  format: uuid
                  description: Grade UUID (required)
                  example: 550e8400-e29b-41d4-a716-446655440001
                subject_id:
                  type: string
                  format: uuid
                  description: Subject UUID (required)
                  example: 550e8400-e29b-41d4-a716-446655440002
                rubric_id:
                  oneOf:
                    - type: string
                      format: uuid
                      description: Rubric UUID
                      example: 550e8400-e29b-41d4-a716-446655440003
                  description: Rubric UUID or integer ID (required)
                date:
                  type: string
                  format: date
                  description: Analysis date (required, cannot be future date)
                  example: '2024-01-15'
                link:
                  type: string
                  format: uri
                  pattern: ^https://.*\.mp3$
                  description: Public HTTPS URL to .mp3 file (required)
                  example: https://example.com/class-recording.mp3
              required:
                - teacher_id
                - board_id
                - grade_id
                - subject_id
                - rubric_id
                - date
                - link
            example:
              institution_id: inst_12345
              teacher_id: teacher_67890
              board_id: 550e8400-e29b-41d4-a716-446655440000
              grade_id: 550e8400-e29b-41d4-a716-446655440001
              subject_id: 550e8400-e29b-41d4-a716-446655440002
              rubric_id: 550e8400-e29b-41d4-a716-446655440003
              date: '2024-01-15'
              link: https://example.com/class-recording.mp3
      responses:
        '200':
          description: Class track analysis process initiated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Unique analysis ID
                          example: 550e8400-e29b-41d4-a716-446655440004
                        message:
                          type: string
                          description: Success message
                          example: Class track analysis process started!
                      required:
                        - id
                        - message
                required:
                  - detail
              example:
                detail:
                  - id: 550e8400-e29b-41d4-a716-446655440004
                    message: Class track analysis process started!
        '422':
          description: Unprocessable Entity – Invalid URL format or validation error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        msg:
                          type: string
                          description: Error message
                          example: >-
                            Invalid URL. Only public HTTPS URLs pointing to .mp3
                            files are allowed.
                      required:
                        - msg
                required:
                  - detail
              example:
                detail:
                  - msg: >-
                      Invalid URL. Only public HTTPS URLs pointing to .mp3 files
                      are allowed.
        '500':
          description: Internal Server Error – Unexpected server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        msg:
                          type: string
                          description: Error message
                          example: Internal Server Error
                      required:
                        - msg
                required:
                  - detail
              example:
                detail:
                  - msg: Internal Server Error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````