Use your API key to automate silence removal in your own pipeline.
# PromptCut Developer API — Full Example
import requests, time
API_KEY = "YOUR_API_KEY"
url = "https://promptcut.tech"
# 1. Submit video for processing
with open("podcast.mp4", "rb") as f:
res = requests.post(f"{url}/process",
headers={"X-API-Key": API_KEY},
files={"file": f},
data={"threshold_db": -35.0, "min_silence_duration": 0.4})
job_id = res.json()["job_id"]
# 2. Poll until done
while True:
s = requests.get(f"{url}/jobs/{job_id}", headers={"X-API-Key": API_KEY}).json()
if s["status"] == "done": break
time.sleep(2)
# 3. Export (deducts credits), then download
requests.post(f"{url}/jobs/{job_id}/export", headers={"X-API-Key": API_KEY})
data = requests.get(f"{url}/jobs/{job_id}/download", headers={"X-API-Key": API_KEY})
with open("podcast-processed.mp4", "wb") as f: f.write(data.content)