curl -X POST https://app.dubformer.ai/api/v1/projects/{project_id}/translations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"target_script": [
{
"start_ms": 100,
"end_ms": 1544,
"text": "Au revoir le monde!",
"speaker_id": 1
}
],
"target_speakers": [
{
"speaker_id": 1,
"voice_key": "53f154:fr-FR-DeniseNeural",
"style": "feminine"
}
],
"mixing_mode": "voiceover_only"
}'
import requests
url = 'https://app.dubformer.ai/api/v1/projects/{project_id}/translations'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
}
data = {
"target_script": [
{
"start_ms": 100,
"end_ms": 1544,
"text": "Au revoir le monde!",
"speaker_id": 1
}
],
"target_speakers": [
{
"speaker_id": 1,
"voice_key": "53f154:fr-FR-DeniseNeural",
"style": "feminine"
}
],
"mixing_mode": "voiceover_only"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const url = 'https://app.dubformer.ai/api/v1/projects/{project_id}/translations';
const headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
};
const data = {
target_script: [
{
start_ms: 100,
end_ms: 1544,
text: "Au revoir le monde!",
speaker_id: 1
}
],
target_speakers: [
{
speaker_id: 1,
voice_key: "53f154:fr-FR-DeniseNeural",
style: "feminine"
}
],
mixing_mode: "voiceover_only"
};
fetch(url, {
method: 'POST',
headers,
body: JSON.stringify(data),
})
.then(response => response.json())
.then(data => console.log(data));
{
"project_id": "12345",
"cost_minutes": 0,
"estimated_completion_date": "2024-06-05T12:00:00Z",
"balance_minutes": 90,
"translations_count": 1
}
Re-translations
Create Re-translation
Modify project script and create new translation
POST
/
api
/
v1
/
projects
/
{project_id}
/
translations
curl -X POST https://app.dubformer.ai/api/v1/projects/{project_id}/translations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"target_script": [
{
"start_ms": 100,
"end_ms": 1544,
"text": "Au revoir le monde!",
"speaker_id": 1
}
],
"target_speakers": [
{
"speaker_id": 1,
"voice_key": "53f154:fr-FR-DeniseNeural",
"style": "feminine"
}
],
"mixing_mode": "voiceover_only"
}'
import requests
url = 'https://app.dubformer.ai/api/v1/projects/{project_id}/translations'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
}
data = {
"target_script": [
{
"start_ms": 100,
"end_ms": 1544,
"text": "Au revoir le monde!",
"speaker_id": 1
}
],
"target_speakers": [
{
"speaker_id": 1,
"voice_key": "53f154:fr-FR-DeniseNeural",
"style": "feminine"
}
],
"mixing_mode": "voiceover_only"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const url = 'https://app.dubformer.ai/api/v1/projects/{project_id}/translations';
const headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
};
const data = {
target_script: [
{
start_ms: 100,
end_ms: 1544,
text: "Au revoir le monde!",
speaker_id: 1
}
],
target_speakers: [
{
speaker_id: 1,
voice_key: "53f154:fr-FR-DeniseNeural",
style: "feminine"
}
],
mixing_mode: "voiceover_only"
};
fetch(url, {
method: 'POST',
headers,
body: JSON.stringify(data),
})
.then(response => response.json())
.then(data => console.log(data));
{
"project_id": "12345",
"cost_minutes": 0,
"estimated_completion_date": "2024-06-05T12:00:00Z",
"balance_minutes": 90,
"translations_count": 1
}
Re-translation functionality is not available to all users by default. If you wish to use this feature, please contact us at support@dubformer.ai.
curl -X POST https://app.dubformer.ai/api/v1/projects/{project_id}/translations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"target_script": [
{
"start_ms": 100,
"end_ms": 1544,
"text": "Au revoir le monde!",
"speaker_id": 1
}
],
"target_speakers": [
{
"speaker_id": 1,
"voice_key": "53f154:fr-FR-DeniseNeural",
"style": "feminine"
}
],
"mixing_mode": "voiceover_only"
}'
import requests
url = 'https://app.dubformer.ai/api/v1/projects/{project_id}/translations'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
}
data = {
"target_script": [
{
"start_ms": 100,
"end_ms": 1544,
"text": "Au revoir le monde!",
"speaker_id": 1
}
],
"target_speakers": [
{
"speaker_id": 1,
"voice_key": "53f154:fr-FR-DeniseNeural",
"style": "feminine"
}
],
"mixing_mode": "voiceover_only"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const url = 'https://app.dubformer.ai/api/v1/projects/{project_id}/translations';
const headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
};
const data = {
target_script: [
{
start_ms: 100,
end_ms: 1544,
text: "Au revoir le monde!",
speaker_id: 1
}
],
target_speakers: [
{
speaker_id: 1,
voice_key: "53f154:fr-FR-DeniseNeural",
style: "feminine"
}
],
mixing_mode: "voiceover_only"
};
fetch(url, {
method: 'POST',
headers,
body: JSON.stringify(data),
})
.then(response => response.json())
.then(data => console.log(data));
Path Parameters
string
required
The unique identifier of the project to re-translate.
Request Body
array
required
Array of target language script segments for dubbing.Timing and Speaker Behavior:
- Speaker assignments are required - Each
speaker_idmust correspond to a speaker intarget_speakers. If not specified, the request will be rejected with validation error - Timings may be modified - System adjusts timings to match synthesized speech length and avoid excessive speed changes, unless
use_fixed_timings: trueis set
array
required
Array of target speaker configurations for dubbing.
Show Speaker Object Properties
Show Speaker Object Properties
number
required
Unique speaker identifier (must match script speaker_id values).
string
required
Speaker style:
masculine or feminine.string
required
Voice identifier. Can be:
soundalikefor AI-generated voices matching original speakersemotional_transferfor emotional soundalike voices- Specific voice key from Get Voices
string
default:"voiceover_with_original_track"
Audio mixing mode:
voiceover_only- Only voiceover without the original trackvoiceover_with_original_track- Voiceover with the original trackvoiceover_without_original_voice- Smart vocal removal dubbing
boolean
default:"false"
Whether to use fixed timings from the target script. By default, timings may be adjusted to fit the original video better.
string
default:"normal"
TTS volume level:
very_quiet, quieter, normal, louder, very_loud.Response
string
Unique identifier for the project.
number
Number of minutes charged for this re-translation (typically 0).
string
ISO timestamp of estimated completion time.
number
Remaining balance in minutes.
number
Total number of translations for this project.
{
"project_id": "12345",
"cost_minutes": 0,
"estimated_completion_date": "2024-06-05T12:00:00Z",
"balance_minutes": 90,
"translations_count": 1
}
Getting Original Script Data
Use Get Project to retrieve the originaloutput_source_script, output_target_script, and output_target_speakers as starting points for your re-translation.
Timing Considerations
start_msandend_msshould align with natural speech boundaries- Large timing changes may affect lip-sync quality
- Use
use_fixed_timings: trueto prevent automatic timing adjustments
Voice Selection
- Use specific voice keys from Get Voices for consistent results
soundalikevoices attempt to match original speaker characteristicsemotional_transferprovides more expression but may be less stable