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

# Transcribe Audio

> Transcribe audio file to text

Transcribe an audio file to text. This endpoint supports various audio formats and handles mobile recordings.

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.gurubase.io/api/v1/{guru_slug}/transcribe/ \
    --header 'x-api-key: YOUR_API_KEY' \
    --header 'Content-Type: multipart/form-data' \
    --form 'audio=@/path/to/your/audio.mp3'
  ```
</RequestExample>

## Path Parameters

<ParamField path="guru_type" type="string" required>
  The guru type identifier for the transcription request
</ParamField>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication. You can obtain your API key from the [Gurubase dashboard](https://app.gurubase.io/api-keys).
</ParamField>

### Body Parameters

<ParamField body="audio" type="file" required>
  The audio file to transcribe. Supported formats: webm, mp3, wav, m4a, ogg. Maximum size: 25MB.
</ParamField>

### Response

The response contains the transcribed text from the audio file.

<ResponseField name="text" type="string">
  The transcribed text from the audio file
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "text": "Hello, this is a test transcription of the audio file."
  }
  ```

  ```json 400 theme={null}
  {
    "msg": "No audio file provided"
  }
  ```

  ```json 400 theme={null}
  {
    "msg": "Audio file too large. Maximum size is 25MB"
  }
  ```

  ```json 400 theme={null}
  {
    "msg": "Invalid audio format. Supported formats: webm, mp3, wav, m4a, ogg"
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Invalid API key"
  }
  ```

  ```json 403 theme={null}
  {
    "msg": "Voice recording is not enabled for this guru type"
  }
  ```

  ```json 429 theme={null}
  {
    "error": "Rate limit exceeded"
  }
  ```

  ```json 500 theme={null}
  {
    "msg": "Error transcribing audio"
  }
  ```
</ResponseExample>
