CleanvoiceDocs
Edits

Retrieve an Edit

Poll for the status and result of an edit job.

The Python SDK handles this automatically. Use process() — it submits the job, polls until completion, and returns the result. You don't need to call get_edit() directly.

result = client.process("https://example.com/episode.mp3", fillers=True)
result.audio.download("cleaned.mp3")

Legacy: manual polling with get_edit()

Use this only if you submitted a job via create_edit() and need to check its status separately — for example in a background worker or webhook handler.

edit = client.get_edit("edit_abc123")
print(edit.status)  # PENDING, STARTED, SUCCESS, FAILURE, RETRY

if edit.status == "SUCCESS":
    edit.audio.download("cleaned.mp3")

The JavaScript SDK handles this automatically. Use process() — it submits the job, polls until completion, and resolves with the result. You don't need to call getEdit() directly.

const result = await client.process('https://example.com/episode.mp3', { fillers: true });
console.log(result.url);

Legacy: manual polling with getEdit()

Use this only if you submitted a job via createEdit() and need to check its status separately.

const edit = await client.getEdit('edit_abc123');
console.log(edit.status); // PENDING, STARTED, SUCCESS, FAILURE, RETRY

if (edit.status === 'SUCCESS') {
  console.log(edit.result.url);
}

Endpoint

GET /v2/edits/{edit_id}

Poll this endpoint after submitting a job until status is SUCCESS or FAILURE.

curl https://api.cleanvoice.ai/v2/edits/edit_abc123 \
  -H "X-API-Key: $CLEANVOICE_API_KEY"

Response

{
  "id": "edit_abc123",
  "status": "SUCCESS",
  "result": {
    "url": "https://storage.cleanvoice.ai/cleaned/episode.mp3",
    "transcript": "Welcome to the show...",
    "summary": {
      "chapters": [],
      "key_learnings": [],
      "social_content": "..."
    }
  }
}

Status values

StatusDescription
PENDINGJob is queued
STARTEDProcessing in progress
SUCCESSDone — result is available
FAILUREProcessing failed
RETRYTemporary failure, retrying automatically

Polling loop

while true; do
  RESPONSE=$(curl -s https://api.cleanvoice.ai/v2/edits/edit_abc123 \
    -H "X-API-Key: $CLEANVOICE_API_KEY")
  STATUS=$(echo $RESPONSE | jq -r '.status')
  echo "Status: $STATUS"
  if [ "$STATUS" = "SUCCESS" ] || [ "$STATUS" = "FAILURE" ]; then
    echo $RESPONSE
    break
  fi
  sleep 10
done

Start polling after ~30 seconds. Poll every 10 seconds after that. Processing typically takes ~30s for short clips, 5–10 min for 1h files.