CleanvoiceDocs

Uploads

How to provide audio or video files to the Cleanvoice API.

There are two ways to provide media files to the Cleanvoice API.

Option 1: Public URL

If your file is already hosted publicly (e.g. on S3, GCS, or a CDN), pass the URL directly in the files array when creating an edit. No separate upload step is needed.

curl -X POST https://api.cleanvoice.ai/v2/edits \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "files": ["https://example.com/episode.mp3"],
      "config": {
        "fillers": { "enabled": true }
      }
    }
  }'
result = client.process(
    "https://example.com/episode.mp3",
    fillers=True,
)
const result = await client.process(
  'https://example.com/episode.mp3',
  { fillers: true }
);

Option 2: File Upload

For local files, upload them to Cleanvoice's storage first (Cloudflare R2), then reference the returned URL in your edit request.

Uploaded files are automatically deleted after 7 days. You can also delete them manually using the Delete Files endpoint.

Request a signed upload URL

curl -X POST https://api.cleanvoice.ai/v2/uploads \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "filename": "episode.mp3" }'

Response:

{
  "upload_url": "https://...",
  "file_url": "https://..."
}

Upload your file

Use the upload_url from the previous step to PUT your file directly to storage:

curl -X PUT "UPLOAD_URL_HERE" \
  -H "Content-Type: audio/mpeg" \
  --data-binary @episode.mp3

Use the file URL in your edit

Pass the file_url in the files array when creating your edit:

curl -X POST https://api.cleanvoice.ai/v2/edits \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "files": ["FILE_URL_HERE"],
      "config": {
        "fillers": { "enabled": true }
      }
    }
  }'

Using the SDKs for local files

The official SDKs handle the upload flow automatically when you pass a local file path:

# Pass a local file path directly — the SDK uploads it for you
result = client.process(
    "/path/to/episode.mp3",
    fillers=True,
    long_silences=True,
)

# You can also upload a file separately and get back the remote URL
remote_url = client.upload_file("/path/to/episode.mp3")

The Python SDK also accepts NumPy audio arrays:

import numpy as np

audio_array = np.zeros(44100)  # your audio data
sample_rate = 44100

result = client.process(
    (audio_array, sample_rate),
    fillers=True,
)
// Pass a local file path — the SDK uploads it automatically
const result = await client.process('/path/to/episode.mp3', {
  fillers: true,
});

Supported formats

TypeFormats
AudioMP3, WAV, FLAC, M4A, OGG, AAC
VideoMP4, MOV, MKV, AVI