Voice-Over API
Generate voice-over audio and merge with video.
Endpoint
POST /v1/voiceover
Authentication
API Key (Bearer token)
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| mediaUrl | string | Yes | URL of the media file. Supports HTTP/HTTPS URLs (max 3500 MB) or URLs from upload mechanism. |
| srtUrl | string | Conditional | URL of SRT file (HTTP/HTTPS or URLs from upload mechanism) |
| srtContent | string | Conditional | Inline SRT content |
| targetLanguage | string | Yes | Target language code. See Supported Languages for available options. |
| outputFormat | string | No | Output format (default: 'same'). Use "audio_only" to produce audio track only, use "same" to align the output format with input media format |
Note: Either srtUrl or srtContent must be provided.
Response
json
{
"jobId": "job_abc123",
"status": "pending",
"message": "Voice-over job started successfully"
}Code Examples
cURL
bash
curl -X POST https://api.rednerapp.com/v1/voiceover \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mediaUrl": "https://example.com/video.mp4",
"srtUrl": "https://example.com/subtitles.srt",
"targetLanguage": "es-ES",
"outputFormat": "same"
}'Python
python
import requests
url = "https://api.rednerapp.com/v1/voiceover"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"mediaUrl": "https://example.com/video.mp4",
"srtUrl": "https://example.com/subtitles.srt",
"targetLanguage": "es-ES",
"outputFormat": "same"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())JavaScript
javascript
const response = await fetch('https://api.rednerapp.com/v1/voiceover', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mediaUrl: 'https://example.com/video.mp4',
srtUrl: 'https://example.com/subtitles.srt',
targetLanguage: 'es-ES',
outputFormat: 'same'
})
});
const data = await response.json();
console.log(data);Java
java
HttpClient client = HttpClient.newHttpClient();
String json = "{\"mediaUrl\":\"https://example.com/video.mp4\"," +
"\"srtUrl\":\"https://example.com/subtitles.srt\"," +
"\"targetLanguage\":\"es\"," +
"\"outputFormat\":\"same\"}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.rednerapp.com/v1/voiceover"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());Media URLs
The mediaUrl parameter accepts:
- HTTP/HTTPS URLs: Direct links to media files (max 3500 MB)
- URLs from the upload mechanism
- Supported formats: mp4, mp3, wav, m4a, webm, ogg, flac, amr
See the Media URLs guide for detailed URL requirements.
Pricing
$0.03 per minute of generated audio