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"
  }'
{
  "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"
  }'

Path Parameters

project_id
string
required
The unique identifier of the project to re-translate.

Request Body

target_script
array
required
Array of target language script segments for dubbing.Timing and Speaker Behavior:
  • Speaker assignments are required - Each speaker_id must correspond to a speaker in target_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: true is set
target_speakers
array
required
Array of target speaker configurations for dubbing.
mixing_mode
string
default:"voiceover_with_original_track"
Audio mixing mode:
  • voiceover_only - Only voiceover without the original track
  • voiceover_with_original_track - Voiceover with the original track
  • voiceover_without_original_voice - Smart vocal removal dubbing
use_fixed_timings
boolean
default:"false"
Whether to use fixed timings from the target script. By default, timings may be adjusted to fit the original video better.
tts_volume
string
default:"normal"
TTS volume level: very_quiet, quieter, normal, louder, very_loud.

Response

project_id
string
Unique identifier for the project.
cost_minutes
number
Number of minutes charged for this re-translation (typically 0).
estimated_completion_date
string
ISO timestamp of estimated completion time.
balance_minutes
number
Remaining balance in minutes.
translations_count
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 original output_source_script, output_target_script, and output_target_speakers as starting points for your re-translation.

Timing Considerations

  • start_ms and end_ms should align with natural speech boundaries
  • Large timing changes may affect lip-sync quality
  • Use use_fixed_timings: true to prevent automatic timing adjustments

Voice Selection

  • Use specific voice keys from Get Voices for consistent results
  • soundalike voices attempt to match original speaker characteristics
  • emotional_transfer provides more expression but may be less stable