CleanvoiceDocs
REST API

Uploads

How to provide files to the Cleanvoice API.

Option 1: Public URL

Pass the file URL directly in the files array. The API fetches it — no upload step needed.

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

Works with any direct download URL: S3, GCS, Dropbox (?dl=1), Google Drive, or your own CDN.

Option 2: File upload

For local files, use a three-step process.

Step 1 — Request a signed upload URL:

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

Response:

{
  "upload_url": "https://storage.example.com/upload/...",
  "file_url": "https://storage.example.com/episode.mp3"
}

Step 2 — PUT your file to the upload URL:

curl -X PUT "https://storage.example.com/upload/..." \
  -H "Content-Type: audio/mpeg" \
  --data-binary @/path/to/episode.mp3

Step 3 — Submit the edit using the file_url:

curl -X POST https://api.cleanvoice.ai/v2/edits \
  -H "X-API-Key: $CLEANVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "files": ["https://storage.example.com/episode.mp3"],
      "config": {
        "fillers": { "enabled": true }
      }
    }
  }'

Uploaded files are automatically deleted 7 days after processing.

Multi-track

For interviews or multi-speaker recordings, pass multiple file URLs and set upload_type to "multitrack":

curl -X POST https://api.cleanvoice.ai/v2/edits \
  -H "X-API-Key: $CLEANVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "files": [
        "https://example.com/host.mp3",
        "https://example.com/guest.mp3"
      ],
      "upload_type": "multitrack",
      "config": {
        "fillers": { "enabled": true }
      }
    }
  }'

This is multi-track, not batch processing. Multiple files are treated as separate tracks of the same recording (e.g. host mic + guest mic). To process multiple independent files, create a separate edit request for each one.

Supported formats

TypeFormats
AudioWAV, MP3, OGG, FLAC, M4A, AIFF, AAC
VideoMP4, MOV, WebM, AVI, MKV