> ## 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.

# Deecho

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

Remove echo from input audio with optional webhook support for async updates.

## Endpoint

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

This endpoint processes an audio file to reduce or eliminate echo effects.

***

## Request Parameters

| Parameter     | Type     | Required | Description                                                                                        |
| ------------- | -------- | -------- | -------------------------------------------------------------------------------------------------- |
| `audio_url`   | `String` | Optional | The URL of an audio file to remove echo from. 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/938a071a-a5f5-40df-8eeb-972edcff26c4_noecho.mp3">Your browser does not support the audio playback.</audio>

<a href="https://cdn1.wav.com/conversions/938a071a-a5f5-40df-8eeb-972edcff26c4_noecho.wav" target="_blank">Download Audio</a>

***

## Try it Yourself

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

***

## Sample Request

### cURL

```bash theme={null}
curl -X POST "https://api.wav.com/api/public/v1/deecho" \
  -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/deecho"

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":"938a071a-a5f5-40df-8eeb-972edcff26c4",
  "conversion_id":"e53b1bb5-381c-4e6f-844d-6a604002483c",
  "eta":59,
  "credit_estimate":0.48,
  "message":"Message published to queue",
  "status":"IN_QUEUE"
}
```

***

## Webhook Response

```json theme={null}
{
  "success": true, 
  "conversion_type": "Deecho", 
  "task_id": "938a071a-a5f5-40df-8eeb-972edcff26c4", 
  "conversion_id": "e53b1bb5-381c-4e6f-844d-6a604002483c", 
  "audio_path": "files/8fd19e25-88c2-49e9-9641-7214cbe99a4f.wav", 
  "no_echo": "https://cdn1.wav.com/conversions/938a071a-a5f5-40df-8eeb-972edcff26c4_noecho.mp3", 
  "no_echo_wav": "", 
  "echo": "https://cdn1.wav.com/conversions/938a071a-a5f5-40df-8eeb-972edcff26c4_echo.mp3", 
  "message": "de_echo conversion Completed", 
  "conversion_duration": 136.82721088435375, 
  "conversion_cost": "0.48"
}
```

***

## Common Errors

* **422 Unprocessable Entity**: Both `audio_url` and `audio_file` cannot be `None`.
* **500 Internal Server Error**: An error occurred on the server.

***

## Payload and Request Formation


## OpenAPI

````yaml POST /v1/deecho
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/deecho:
    post:
      summary: Remove echo from an audio file or URL
      description: >-
        Initiate an echo 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: 3d137437-4911-4669-b639-9e5701107c25
                  conversion_id: b764b4f6-a842-42dd-a55b-818eb8251dc7
                  eta: 51
                  credit_estimate: 0.03
                  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/deecho"


            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

````