Create an Edit
Submit an audio or video file for AI-powered editing.
Endpoint
POST /v2/editsSubmit a new editing job. The job runs asynchronously — you receive an edit_id immediately, then retrieve the result by polling.
Request body
{
"input": {
"files": ["https://example.com/podcast.mp3"],
"config": {
"fillers": true,
"long_silences": true,
"mouth_sounds": true,
"stutters": true,
"breath": true,
"remove_noise": true,
"studio_sound": false,
"normalize": true,
"transcription": false,
"summarize": false
}
}
}Response
{ "id": "edit_abc123" }Example
Try with your API key
Paste your key — all code examples on this page update instantly. Stays in your browser only, never sent anywhere.
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": true,
"long_silences": true,
"mouth_sounds": true,
"normalize": true
}
}
}'<?php
$ch = curl_init('https://api.cleanvoice.ai/v2/edits');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: ' . getenv('CLEANVOICE_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'input' => [
'files' => ['https://example.com/episode.mp3'],
'config' => [
'fillers' => true,
'long_silences' => true,
'mouth_sounds' => true,
'normalize' => true,
],
],
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $response['id']; // edit_abc123import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String body = """
{
"input": {
"files": ["https://example.com/episode.mp3"],
"config": {
"fillers": true,
"long_silences": true,
"mouth_sounds": true,
"normalize": true
}
}
}""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.cleanvoice.ai/v2/edits"))
.header("X-API-Key", System.getenv("CLEANVOICE_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body()); // {"id":"edit_abc123"}require 'net/http'
require 'json'
uri = URI('https://api.cleanvoice.ai/v2/edits')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['X-API-Key'] = ENV['CLEANVOICE_API_KEY']
request['Content-Type'] = 'application/json'
request.body = JSON.generate({
input: {
files: ['https://example.com/episode.mp3'],
config: {
fillers: true,
long_silences: true,
mouth_sounds: true,
normalize: true,
},
},
})
response = JSON.parse(http.request(request).body)
puts response['id'] # edit_abc123{ "id": "edit_abc123" }The job is now queued. Use the id to poll for the result. Polling status can move through PENDING, PREPROCESSING, CLASSIFICATION, EDITING, POSTPROCESSING, EXPORT, SUCCESS, FAILURE, or RETRY.
Multi-track
For interviews or multi-speaker recordings, pass multiple URLs in the files array and set upload_type to "multitrack":
{
"input": {
"files": [
"https://example.com/host.mp3",
"https://example.com/guest.mp3"
],
"upload_type": "multitrack",
"config": {
"fillers": true
}
}
}Not sure which settings to enable? See Edit Settings for recommended presets.
Configuration reference
See Edit Settings for a full list of configuration options and recommended presets.