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

# Upload a file

> Uploads an audio file for transcription. Transcription is asynchronous; Wavix sends a POST callback to `callback_url` when it completes, including the `request_id` returned by this request.

Callback body:
```json
   {
        "request_id": "e865ea07-25af-4fdd-876e-04b0d41d5ebd",
        "status": "completed",
        "error": null
   }
```

- `request_id`: ID of the transcription request.
- `status`: One of `completed` (transcription succeeded) or `failed` (transcription encountered an error).
- `error`: Error description, or `null` when the transcription succeeded.



## OpenAPI

````yaml https://wavix.github.io/wavix-openapi/wavix-api.yaml post /v1/speech-analytics
openapi: 3.1.0
info:
  title: Wavix APIs
  description: >-
    Wavix provides robust APIs that let you integrate voice and text messaging
    features directly into your app. Send text, place calls, and access detailed
    reports  programmatically.
  termsOfService: https://wavix.com/terms-and-conditions
  license:
    name: MIT
    identifier: MIT
  contact:
    name: Wavix
    url: https://wavix.com
    email: support@wavix.com
  version: '1.0'
servers:
  - url: https://api.wavix.com
    description: https://api.wavix.com
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: SIP trunks
  - name: Buy
    description: Numbers
  - name: Cart
    description: Numbers
  - name: My numbers
    description: Numbers
  - name: Billing
    description: Billing, transactions, and invoices
  - name: Profile
    description: Account profile and customer information
  - name: CDRs
    description: Call detail records and call history
  - name: Speech Analytics
    description: Call transcription and speech analytics
  - name: SMS and MMS
    description: Messaging
  - name: Number Validator
    description: Phone number validation
  - name: Link shortener
    description: Short link and click metrics
  - name: 2FA
    description: Two-factor authentication
  - name: 10DLC
    description: 10DLC Campaigns and Brands
  - name: API Keys
    description: API key management
  - name: Call webhooks
    description: Webhook configuration for call events
  - name: Call control
    description: Programmable Voice
  - name: Call streaming
    description: Real-time call audio streaming over WebSocket
  - name: Call recording
    description: Call recording
  - name: Sub-accounts
    description: Sub-account management
  - name: Voice campaigns
    description: Outbound voice campaigns
  - name: Wavix Embeddable
    description: WebRTC embeddable widget
paths:
  /v1/speech-analytics:
    post:
      tags:
        - Speech Analytics
      summary: Upload a file
      description: >-
        Uploads an audio file for transcription. Transcription is asynchronous;
        Wavix sends a POST callback to `callback_url` when it completes,
        including the `request_id` returned by this request.


        Callback body:

        ```json
           {
                "request_id": "e865ea07-25af-4fdd-876e-04b0d41d5ebd",
                "status": "completed",
                "error": null
           }
        ```


        - `request_id`: ID of the transcription request.

        - `status`: One of `completed` (transcription succeeded) or `failed`
        (transcription encountered an error).

        - `error`: Error description, or `null` when the transcription
        succeeded.
      operationId: speech_analytics_create
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            encoding: {}
            schema:
              required:
                - file
                - callback_url
              type: object
              additionalProperties: false
              properties:
                file:
                  type: string
                  description: >-
                    Audio file to transcribe. Maximum size is 25 MB. Supported
                    formats are WAV, MP3, and MP4 stereo.
                  format: binary
                callback_url:
                  type: string
                  description: >-
                    URL that receives the POST callback when transcription
                    completes.
                  example: https://you-site.com/webhook
                insights:
                  type: boolean
                  description: >-
                    When `true`, generates conversation insights alongside the
                    transcript.
                  example: true
        required: false
      responses:
        '200':
          description: Returns the transcription `request_id` for the uploaded file.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SubmitFileTranscriptionResponse'
                  - example:
                      file: file.mp3
                      request_id: e865ea07-25af-4fdd-876e-04b0d41d5ebd
                      success: true
              examples:
                default:
                  value:
                    file: file.mp3
                    request_id: e865ea07-25af-4fdd-876e-04b0d41d5ebd
                    success: true
        '400':
          $ref: '#/components/responses/BadRequestErrorResponse'
        '422':
          $ref: '#/components/responses/ValidationErrorResponse'
      deprecated: false
      security:
        - bearerAuth:
            - calls:write
components:
  schemas:
    SubmitFileTranscriptionResponse:
      title: SubmitFileTranscriptionResponse
      required:
        - file
        - request_id
        - success
      type: object
      properties:
        file:
          type: string
          description: Uploaded file name.
          example: file.mp3
        request_id:
          type: string
          description: Transcription request ID.
          example: e865ea07-25af-4fdd-876e-04b0d41d5ebd
        success:
          type: boolean
          description: Indicates whether the request was successful.
          example: true
      example:
        file: file.mp3
        request_id: e865ea07-25af-4fdd-876e-04b0d41d5ebd
        success: true
    ValidationErrorResponse:
      title: ValidationErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: >-
            Human-readable description naming the missing or invalid request
            parameter.
          example: Missing or invalid parameter <param_name>
  responses:
    BadRequestErrorResponse:
      description: Request failed. Missing or invalid parameter <param_name>
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
    ValidationErrorResponse:
      description: Validation error
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Wavix API key. Pass as `Authorization: Bearer <api_key>`. Keys support
        per-resource scopes (none / read / write). See [Restricted keys and
        scopes](https://docs.wavix.com/api-reference/authentication#restricted-keys-and-scopes).

````