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

# Dereverb

> Initiate a reverberation removal task using either an audio URL or file upload with optional webhook callback.

Remove reverb from an input audio file with optional webhook callback for asynchronous updates.

***

## Endpoint

```http theme={null}
POST /v1/dereverb
```

This endpoint removes reverberation (echo) from an uploaded or linked audio file. A `webhook_url` can be provided for asynchronous task status updates.

***

## Request Parameters

| Parameter     | Type     | Required | Description                                                                          |
| ------------- | -------- | -------- | ------------------------------------------------------------------------------------ |
| `audio_url`   | `String` | Optional | The URL of an audio file. Either `audio_url` or `audio_file` must be provided.       |
| `audio_file`  | `File`   | Optional | Upload the audio file directly. Either `audio_url` or `audio_file` must be provided. |
| `webhook_url` | `String` | Optional | Callback URL for async response.                                                     |

> **Note:** Either audio\_file or audio\_url must be provided.

> **content-type:** multipart/form-data

***

## Sample Output

Listen to a real sample output:
<audio controls="1" controlslist="nodownload nofullscreen noremoteplayback" src="https://cdn1.wav.com/conversions/e99d00bb-2ddf-4279-a15e-6e22801ee575_reverb.mp3">Your browser does not support the audio playback.</audio>

<a href="https://cdn1.wav.com/conversions/e99d00bb-2ddf-4279-a15e-6e22801ee575_reverb.wav" target="_blank">Download Audio</a>

***

## Try it Yourself

Visit the [Dereverb Endpoint Explorer](/api-documentation/endpoint/dereverb) to try your own text samples.

***

## Sample Request

### cURL

```bash theme={null}
curl -X POST "https://api.wav.com/api/public/v1/dereverb" \
  -H "Authorization: <API_KEY>" \
  -F "audio_url=<YOUR_AUDIO_URL>" \
  -F "webhook_url=https://example.com/my-webhook"
```

### Python

```python theme={null}
import requests

url = "https://api.wav.com/api/public/v1/dereverb"

headers = {
    "Authorization": "<API_KEY>"
}

data = {
    "webhook_url": "https://example.com/my-webhook"
}

# Option 1: audio_url
data["audio_url"] = "<YOUR_AUDIO_URL>"
response = requests.post(url, headers=headers, data=data)

# Option 2: File Upload
# with open("song.mp3", "rb") as f:
#     files = {"audio_file": f}
#     response = requests.post(url, headers=headers, data=data, files=files)

print(response.json())
```

***

## Sample Response

### Success (200 OK)

```json theme={null}
{
  "success":true,
  "task_id":"e99d00bb-2ddf-4279-a15e-6e22801ee575",
  "conversion_id":"fbcf0c40-a33d-40aa-8c1d-7bb6f9df0b0f",
  "eta":40,
  "credit_estimate":0.48,
  "message":"Message published to queue",
  "status":"IN_QUEUE"
}
```

***

## Webhook Response

### Success (200 OK)

```json theme={null}
{
  "success": true, 
  "conversion_type": "Dereverb", 
  "task_id": "e99d00bb-2ddf-4279-a15e-6e22801ee575", 
  "conversion_id": "fbcf0c40-a33d-40aa-8c1d-7bb6f9df0b0f", 
  "audio_path": "files/4efbdeff-48a2-401c-a9e6-8a2ffe465487.wav", 
  "noreverb": "https://cdn1.wav.com/conversions/e99d00bb-2ddf-4279-a15e-6e22801ee575_reverb.mp3", 
  "reverb": "https://cdn1.wav.com/conversions/e99d00bb-2ddf-4279-a15e-6e22801ee575_noreverb.mp3", 
  "reverb_wav": "", 
  "message": "de_reverb conversion Completed", 
  "conversion_duration": 136.83045351473922, 
  "conversion_cost": "0.48"
}
```

***

## Common Errors

* **422 Unprocessable Entity**: Both `audio_url` and `audio_file` cannot be `None`.
* **500 Internal Server Error**: A server error occurred during processing.

***


## OpenAPI

````yaml POST /v1/dereverb
openapi: 3.1.0
info:
  title: WAV API
  version: 1.0.0
  description: API for retrieving conversion details by ID.
servers:
  - url: https://api.wav.com/api/public
    description: Production server
security: []
paths:
  /v1/dereverb:
    post:
      summary: Removes reverberation from an audio file or URL
      description: >-
        Initiate a reverberation removal task using either an audio URL or file
        upload with optional webhook callback.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                audio_url:
                  type: string
                  description: 'Input audio URL (supported format: YouTube URL).'
                  example: https://www.youtube.com/watch?v=example123
                audio_file:
                  type: string
                  format: binary
                  description: Audio file to upload and process directly.
                webhook_url:
                  type: string
                  description: Callback URL for async processing results.
                  example: http://your-webhook-url.com/callback
              anyOf:
                - required:
                    - audio_url
                - required:
                    - audio_file
      responses:
        '200':
          description: Successfully initiated task
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  task_id:
                    type: string
                  conversion_id:
                    type: string
                  eta:
                    type: integer
                  credit_estimate:
                    type: number
                  message:
                    type: string
                  status:
                    type: string
                example:
                  success: true
                  task_id: e99d00bb-2ddf-4279-a15e-6e22801ee575
                  conversion_id: fbcf0c40-a33d-40aa-8c1d-7bb6f9df0b0f
                  eta: 40
                  credit_estimate: 0.48
                  message: Message published to queue
                  status: IN_QUEUE
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Either audio_url or audio_file must be provided.
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Internal Server Error
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: Python
          source: >-
            import requests


            url = "https://api.wav.com/api/public/v1/dereverb"


            headers = {
                "Authorization": "<API_KEY>"
            }


            data = {
                "webhook_url": "https://example.com/my-webhook"
            }


            # Option 1: audio_url

            data["audio_url"] = "<YOUR_AUDIO_URL>"

            response = requests.post(url, headers=headers, data=data)


            # Option 2: File Upload

            # with open("song.mp3", "rb") as f:

            #     files = {"audio_file": f}

            #     response = requests.post(url, headers=headers, data=data,
            files=files)


            print(response.json())
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````