# Authentication Source: https://docs.dubformer.ai/emotional/authentication Learn how to authenticate with the Emotion Transfer TTS API The Emotion Transfer TTS API uses Bearer token authentication. All API requests must include an `Authorization` header with your API key. ## Getting Your API Key To get access to the Emotion Transfer TTS API, please contact our sales team at [sales@dubformer.ai](mailto:sales@dubformer.ai). > [!WARNING] > > Keep your API key secure and never expose it in client-side code. Treat it like a password. ## Making Authenticated Requests Include your API key in the `Authorization` header of every request: ```bash theme={null} curl -X GET https://app.dubformer.ai/api/v1/balance \ -H "Authorization: Bearer YOUR_API_KEY" ``` ## Required Headers Every API request must include: * `Authorization: Bearer YOUR_API_KEY` - Your authentication token * `Content-Type: multipart/form-data` - For POST requests with form-data body # Voice Cloning & Synthesis Source: https://docs.dubformer.ai/emotional/endpoints/cloning-synthesize POST https://app.dubformer.ai/api/v1/cloning/synthesize Generate high-quality emotional text-to-speech with voice cloning capabilities The Voice Cloning & Synthesis API enables you to generate natural-sounding speech with emotional transfer capabilities. This advanced endpoint uses AI-powered voice cloning technology to synthesize speech that matches the characteristics and emotional tone of reference audio samples. > [!NOTE] > > This endpoint requires a PRO subscription or higher to access voice cloning features. ```bash cURL theme={null} curl -X POST https://app.dubformer.ai/api/v1/cloning/synthesize \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "text=Hello world, this is a test of our voice cloning technology!" \ -F "language=en-US" \ -F "reference_audio_files=@reference_voice_1.wav" \ -F "reference_audio_files=@reference_voice_2.wav" ``` ```python Python theme={null} import requests url = 'https://app.dubformer.ai/api/v1/cloning/synthesize' headers = { 'Authorization': 'Bearer YOUR_API_KEY', } # Prepare the form data data = { 'text': 'Hello world, this is a test of our voice cloning technology!', 'language': 'en-US' } # Prepare the files (multiple reference audio files) files = [ ('reference_audio_files', open('reference_voice_1.wav', 'rb')), ('reference_audio_files', open('reference_voice_2.wav', 'rb')) ] response = requests.post(url, headers=headers, data=data, files=files) # Save the audio response with open('synthesized_audio.wav', 'wb') as f: f.write(response.content) print(f"Audio saved with status: {response.status_code}") ``` ```javascript JavaScript theme={null} const url = 'https://app.dubformer.ai/api/v1/cloning/synthesize'; const headers = { 'Authorization': 'Bearer YOUR_API_KEY', }; // Create form data const formData = new FormData(); formData.append('text', 'Hello world, this is a test of our voice cloning technology!'); formData.append('language', 'en-US'); // Add reference audio file (assuming you have a file input element) const fileInput = document.getElementById('audioFile'); if (fileInput.files[0]) { formData.append('reference_audio_files', fileInput.files[0]); } fetch(url, { method: 'POST', headers, body: formData, }) .then(response => { if (response.ok) { return response.blob(); } throw new Error('Network response was not ok'); }) .then(blob => { // Create download link for the audio const audioUrl = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = audioUrl; a.download = 'synthesized_audio.wav'; a.click(); }); ``` ```typescript TypeScript theme={null} interface ConditioningFeaturesOverride { pitch_variance?: 'low' | 'medium' | 'high' | 'auto'; target_duration?: number | 'auto'; } interface VoiceCloningRequest { text: string; language: string; reference_audio_files: File[]; } const url: string = 'https://app.dubformer.ai/api/v1/cloning/synthesize'; const headers: Record = { 'Authorization': 'Bearer YOUR_API_KEY', }; const formData = new FormData(); const requestData: VoiceCloningRequest = { text: 'Hello world, this is a test of our voice cloning technology!', language: 'en-US', reference_audio_files: [] }; formData.append('text', requestData.text); formData.append('language', requestData.language); const fileInput = document.getElementById('audioFile') as HTMLInputElement; if (fileInput?.files) { Array.from(fileInput.files).forEach(file => { formData.append('reference_audio_files', file); }); } fetch(url, { method: 'POST', headers, body: formData, }) .then((response: Response) => { if (response.ok) { return response.blob(); } throw new Error('Network response was not ok'); }) .then((blob: Blob) => { const audioUrl: string = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = audioUrl; a.download = 'synthesized_audio.wav'; a.click(); }); ``` ## Request Parameters **text** `string` *required* The text content to be synthesized into speech. Maximum length: 5000 characters. **language** `string` *required* The target language for speech synthesis with locale (e.g., "en-US", "fr-FR", "es-ES"). Must match one of the supported languages from [Get Options](/platform/endpoints/get-options). **reference\_audio\_files** `file[]` *required* One or more audio files containing reference voice samples for cloning. **Supported formats:** WAV, MP3, M4A, FLAC\ **Maximum file size:** 50MB per file\ **Recommended length:** 3-30 seconds for optimal results\ **Quality requirements:** Clear audio with minimal background noise ## Response ### Success Response (200) **audio** `binary` Synthesized audio as a binary WAV file. **Content-Type:** `audio/wav`\ **File Format:** 16-bit PCM WAV, 44.1kHz sample rate ```bash Success Response theme={null} # Binary WAV audio file is returned Content-Type: audio/wav Content-Length: 524288 # Save to file curl -X POST https://app.dubformer.ai/api/v1/cloning/synthesize \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "text=Hello world!" \ -F "language=en-US" \ -F "reference_audio_files=@reference.wav" \ --output synthesized_audio.wav ``` ```json Error Response theme={null} { "error": "Contact with sales manager for enable API" } ``` # Error Handling Source: https://docs.dubformer.ai/emotional/errors Understanding API errors and how to handle them ## Common Error Types ### ValidationError Occurs when request parameters are invalid or missing. ```json ValidationError Example theme={null} { "error": "ValidationError", "message": "language is required" } ``` **Common causes:** * Missing required fields * Invalid language codes * Malformed request body * Invalid parameter values **How to fix:** * Check all required fields are provided * Validate language codes * Ensure request body is valid form-data ### UnauthorizedError Occurs when authentication fails. ```json UnauthorizedError Example theme={null} { "error": "UnauthorizedError", "message": "Invalid API key" } ``` **Common causes:** * Missing Authorization header * Invalid API key * Expired API key * Wrong API key for the environment **How to fix:** * Include `Authorization: Bearer YOUR_API_KEY` header * Verify your API key is correct and active * Generate a new API key if needed # Emotion Transfer TTS API Overview Source: https://docs.dubformer.ai/emotional/overview Emotion Transfer TTS API overview and key concepts The Emotion Transfer TTS API provides direct access to Dubformer's text-to-speech functionality. ## Base URL ``` https://app.dubformer.ai/api/v1 ``` ## Key Features ### Generating audio file Submit audio references and narration text ## What You Can Do 1. **Generate audio** - Submit audio references and narration text ## Supported Languages There is list of supported languages: * en * ru * de * fr * it * es * es-es * es-mx * es-ar * es-us * en-us * en-gb * en-ca * en-au * en-in # Choose Your API Source: https://docs.dubformer.ai/overview Select the API that best fits your needs > [card] [Self-Service Dubbing Platform](/platform/overview) > > Anyone can register and start dubbing videos automatically via API. > [card] [Professional AI Dubbing Studio for Localization Companies](/studio/authentication) > > Advanced solution for complex projects with sophisticated workflow management, professional editing interface, multi-stage project management, and enterprise-grade quality control. > [card] [Professional text-to-speech API](/emotional/endpoints/cloning-synthesize) > > The target language for speech synthesis with locale (e.g., “en-US”, “fr-FR”, “es-ES”). Must match one of the supported languages from [Get Options](/platform/endpoints/get-options). > [!NOTE] > > Need help choosing? Contact our team at [sales@dubformer.ai](mailto:sales@dubformer.ai) # Authentication Source: https://docs.dubformer.ai/platform/authentication Learn how to authenticate with the Platform API The Platform API uses Bearer token authentication. All API requests must include an `Authorization` header with your API key. ## Getting Your API Key 1. [Sign up](https://app.dubformer.ai/signup) for a Dubformer account 2. Navigate to the [API section](https://app.dubformer.ai/docs/api) in your dashboard 3. Click "Create API key" to generate your token 4. Copy your API key and store it securely > [!WARNING] > > Keep your API key secure and never expose it in client-side code. Treat it like a password. ## Making Authenticated Requests Include your API key in the `Authorization` header of every request: ```bash theme={null} curl -X GET https://app.dubformer.ai/api/v1/balance \ -H "Authorization: Bearer YOUR_API_KEY" ``` ## Required Headers Every API request must include: * `Authorization: Bearer YOUR_API_KEY` - Your authentication token * `Content-Type: application/json` - For POST requests with JSON body ## Optional Headers * `Idempotency-Key` - For POST requests to ensure request uniqueness and prevent duplicate processing Example with all headers: ```bash theme={null} curl -X POST https://app.dubformer.ai/api/v1/projects \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: unique-request-id" \ -d '{"name": "My Project", "source_lang": "en", "target_lang": "fr-FR"}' ``` # Get Balance Source: https://docs.dubformer.ai/platform/endpoints/get-balance GET https://app.dubformer.ai/api/v1/balance Retrieve current account balance ```bash cURL theme={null} curl -X GET https://app.dubformer.ai/api/v1/balance \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```python Python theme={null} import requests url = 'https://app.dubformer.ai/api/v1/balance' headers = { 'Authorization': 'Bearer YOUR_API_KEY', } response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript JavaScript theme={null} const url = 'https://app.dubformer.ai/api/v1/balance'; const headers = { 'Authorization': 'Bearer YOUR_API_KEY', }; fetch(url, { method: 'GET', headers, }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Response **balance\_minutes** `number` Current balance in minutes of video processing time. ```json Success Response theme={null} { "balance_minutes": 90 } ``` Your balance is consumed when: * Creating new dubbing projects (charged upon project creation) * The charge is based on the duration of the source video * Re-translations typically don't consume additional minutes Failed projects don't consume balance. # Get Options Source: https://docs.dubformer.ai/platform/endpoints/get-options GET https://app.dubformer.ai/api/v1/options Retrieve supported languages and options ```bash cURL theme={null} curl -X GET https://app.dubformer.ai/api/v1/options \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```python Python theme={null} import requests url = 'https://app.dubformer.ai/api/v1/options' headers = { 'Authorization': 'Bearer YOUR_API_KEY', } response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript JavaScript theme={null} const url = 'https://app.dubformer.ai/api/v1/options'; const headers = { 'Authorization': 'Bearer YOUR_API_KEY', }; fetch(url, { method: 'GET', headers, }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Response **source\_langs** `array` Array of supported source language codes (without locale). These are used for speech recognition and transcription. **target\_langs** `array` Array of supported target language codes (with locale). These are used for translation and text-to-speech synthesis. ```json Success Response theme={null} { "source_langs": [ "ar", "de", "en", "es", "fr", "hi", "it", "ja", "ko", "nl", "pl", "pt", "ru", "tr", "uk", "zh" ], "target_langs": [ "af-ZA", "am-ET", "ar-AE", "ar-BH", "ar-DZ", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "bg-BG", "bn-BD", "bn-IN", "ca-ES", "cs-CZ", "cy-GB", "da-DK", "de-AT", "de-CH", "de-DE", "el-GR", "en-AU", "en-CA", "en-GB", "en-IE", "en-IN", "en-NZ", "en-US", "en-ZA", "es-AR", "es-BO", "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-ES", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PE", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et-EE", "fa-IR", "fi-FI", "fr-BE", "fr-CA", "fr-CH", "fr-FR", "ga-IE", "gl-ES", "gu-IN", "he-IL", "hi-IN", "hr-HR", "hu-HU", "id-ID", "is-IS", "it-IT", "ja-JP", "jv-ID", "ka-GE", "kk-KZ", "km-KH", "kn-IN", "ko-KR", "lo-LA", "lt-LT", "lv-LV", "mk-MK", "ml-IN", "mn-MN", "mr-IN", "ms-MY", "mt-MT", "my-MM", "nb-NO", "ne-NP", "nl-BE", "nl-NL", "pl-PL", "ps-AF", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "si-LK", "sk-SK", "sl-SI", "so-SO", "sq-AL", "sr-RS", "su-ID", "sv-SE", "sw-KE", "sw-TZ", "ta-IN", "ta-LK", "ta-MY", "ta-SG", "te-IN", "th-TH", "tr-TR", "uk-UA", "ur-IN", "ur-PK", "uz-UZ", "vi-VN", "zh-CN", "zh-HK", "zh-TW", "zu-ZA" ] } ``` ## Language Code Format ### Source Languages Source language codes follow ISO 639-1 format (2-letter codes): * `en` - English * `es` - Spanish * `fr` - French * `de` - German * etc. ### Target Languages Target language codes follow BCP 47 format (language-locale): * `en-US` - English (United States) * `en-GB` - English (United Kingdom) * `es-ES` - Spanish (Spain) * `es-MX` - Spanish (Mexico) * `fr-FR` - French (France) * `fr-CA` - French (Canada) * etc. ## Usage Notes * Always use the exact language codes returned by this endpoint * Source languages are used in the `source_lang` field when creating projects * Target languages are used in the `target_lang` field when creating projects * Not all source-target language combinations may be available for all features * Language support is continuously expanding > [!NOTE] > > Call this endpoint regularly to get the most up-to-date list of supported languages, as new languages are added periodically. # Get Voices Source: https://docs.dubformer.ai/platform/endpoints/get-voices GET https://app.dubformer.ai/api/v1/voices Retrieve supported voices for re-translations ```bash cURL theme={null} curl -X GET https://app.dubformer.ai/api/v1/voices \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```python Python theme={null} import requests url = 'https://app.dubformer.ai/api/v1/voices' headers = { 'Authorization': 'Bearer YOUR_API_KEY', } response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript JavaScript theme={null} const url = 'https://app.dubformer.ai/api/v1/voices'; const headers = { 'Authorization': 'Bearer YOUR_API_KEY', }; fetch(url, { method: 'GET', headers, }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Response **voices** `object` Object with language codes as keys and arrays of voice objects as values. **Voice Object Properties** **name** `string` Human-readable name of the voice. **voice\_key** `string` Unique identifier for the voice to use in API requests. **style** `string` Voice style: `masculine` or `feminine`. ```json Success Response theme={null} { "voices": { "af-ZA": [ { "name": "Adri", "voice_key": "53f154:af-ZA-AdriNeural", "style": "feminine" }, { "name": "Willem", "voice_key": "53f154:af-ZA-WillemNeural", "style": "masculine" } ], "en-US": [ { "name": "Jenny", "voice_key": "53f154:en-US-JennyNeural", "style": "feminine" }, { "name": "Guy", "voice_key": "53f154:en-US-GuyNeural", "style": "masculine" }, { "name": "Aria", "voice_key": "53f154:en-US-AriaNeural", "style": "feminine" } ], "es-ES": [ { "name": "Elvira", "voice_key": "53f154:es-ES-ElviraNeural", "style": "feminine" }, { "name": "Alvaro", "voice_key": "53f154:es-ES-AlvaroNeural", "style": "masculine" } ] } } ``` ## Usage When [creating projects](/platform/endpoints/projects/create-project), the system automatically selects appropriate voices based on speaker detection and the target language. You don't need to specify voices explicitly. Use these voice keys when [creating re-translations](/platform/endpoints/projects/create-retranslation) to specify exact voices for each speaker. ### Special Voice Keys In addition to the specific voices listed, you can use these special voice keys: * `soundalike` - Uses AI-generated voices that match the original speaker characteristics * `emotional_transfer` - Uses emotional soundalike voices (less stable but more expressive) ## Voice Availability * Not all languages have the same number of available voices * Voice availability may vary based on your [subscription level](https://app.dubformer.ai/subscriptions) * New voices are added regularly as our TTS providers expand their offerings > [!NOTE] > > The voice list is continuously updated. Call this endpoint regularly to get the latest available voices for each language. # Create Project Source: https://docs.dubformer.ai/platform/endpoints/projects/create-project POST https://app.dubformer.ai/api/v1/projects Create a new dubbing project ```bash cURL theme={null} curl -X POST https://app.dubformer.ai/api/v1/projects \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "My Project", "source_lang": "en", "target_lang": "fr-FR", "source_video_url": "https://example.com/video.mp4", "use_soundalike_voices": true, "mixing_mode": "voiceover_with_original_track" }' ``` ```python Python theme={null} import requests url = 'https://app.dubformer.ai/api/v1/projects' headers = { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json', } data = { "name": "My Project", "source_lang": "en", "target_lang": "fr-FR", "source_video_url": "https://example.com/video.mp4", "use_soundalike_voices": True, "mixing_mode": "voiceover_with_original_track" } response = requests.post(url, headers=headers, json=data) print(response.json()) ``` ```javascript JavaScript theme={null} const url = 'https://app.dubformer.ai/api/v1/projects'; const headers = { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json', }; const data = { name: "My Project", source_lang: "en", target_lang: "fr-FR", source_video_url: "https://example.com/video.mp4", use_soundalike_voices: true, mixing_mode: "voiceover_with_original_track" }; fetch(url, { method: 'POST', headers, body: JSON.stringify(data), }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Request Body **name** `string` The name of the project for organization purposes. **source\_lang** `string` *required* The source language of the video without locale (e.g., "en", "es", "fr"). Get the full list from [Get Options](/platform/endpoints/get-options). **target\_lang** `string` *required* The target language for dubbing with locale (e.g., "en-US", "fr-FR", "es-ES"). Get the full list from [Get Options](/platform/endpoints/get-options). **source\_video\_url** `string` *required* Direct link to the source video file or YouTube URL. **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\_emotional\_transfer** `boolean` (default: false) Enable emotional but less stable soundalike voices. \[!NOTE] Supports only English, Spanish, French, German, Italian, and Portuguese target languages. **use\_soundalike\_voices** `boolean` (default: false) Enable soundalike voices that match original speaker characteristics. \[!NOTE] Requires an [active subscription](https://app.dubformer.ai/subscriptions). **source\_script\_content** `string` Custom transcription of the source video in SRT, VTT, or plain text format. \[!NOTE] [Pro subscription](https://app.dubformer.ai/subscriptions) feature. **Timing and Speaker Behavior:** * **Timings are NOT preserved** - Original timings are ignored and recalculated based on speech boundaries in audio for precise alignment * **Speaker markup is NOT preserved** - Speaker tags (e.g., ``, ``) are ignored and not extracted as speaker information **source\_script** `array` Structured source script with precise timings. Array of objects with `start_ms`, `end_ms`, and `text` fields. Speakers will be determined automatically via biometrics. \[!NOTE] [Pro subscription](https://app.dubformer.ai/subscriptions) feature. **Cannot be used together with `source_script_content`.** Example: ```json theme={null} [ { "start_ms": 0, "end_ms": 2000, "text": "Hello world" }, { "start_ms": 2500, "end_ms": 5000, "text": "How are you?" } ] ``` **use\_fixed\_timings** `boolean` (default: false) When `true`, source timings from `source_script` will be preserved (no alignment or rechunking). Useful when providing pre-translated scripts with `source_lang` = `target_lang`. **glossary\_content** `string` Translation glossary in TSV format to ensure consistent terminology. \[!NOTE] [Pro subscription](https://app.dubformer.ai/subscriptions) feature. **tts\_volume** `string` (default: normal) TTS volume level. Options: `very_quiet`, `quieter`, `normal`, `louder`, `very_loud`. ## Response **project\_id** `string` Unique identifier for the created project. **cost\_minutes** `number` Number of minutes charged for this project. **estimated\_completion\_date** `string` ISO timestamp of estimated completion time. **balance\_minutes** `number` Remaining balance in minutes after this project. **translations\_count** `number` Number of translations created (always 0 for new projects). ```json Success Response theme={null} { "project_id": "12345", "cost_minutes": 10, "estimated_completion_date": "2024-06-05T12:00:00Z", "balance_minutes": 90, "translations_count": 0 } ``` # Create Re-translation Source: https://docs.dubformer.ai/platform/endpoints/projects/create-retranslation POST https://app.dubformer.ai/api/v1/projects/{project_id}/translations Modify project script and create new translation > [!WARNING] > > 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](mailto:support@dubformer.ai). ```bash cURL theme={null} 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" }' ``` ```python Python theme={null} 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()) ``` ```javascript JavaScript theme={null} 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 **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 **Script Object Properties** **start\_ms** `number` *required* Start time in milliseconds. **end\_ms** `number` *required* End time in milliseconds. **text** `string` *required* Text of the translation to synthesize. **speaker\_id** `number` *required* Speaker ID corresponding to target\_speakers. **target\_speakers** `array` *required* Array of target speaker configurations for dubbing. **Speaker Object Properties** **speaker\_id** `number` *required* Unique speaker identifier (must match script speaker\_id values). **style** `string` *required* Speaker style: `masculine` or `feminine`. **voice\_key** `string` *required* Voice identifier. Can be: * `soundalike` for AI-generated voices matching original speakers * `emotional_transfer` for emotional soundalike voices * Specific voice key from [Get Voices](/platform/endpoints/get-voices) **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. ```json Success Response theme={null} { "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](/platform/endpoints/projects/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](/platform/endpoints/get-voices) for consistent results * `soundalike` voices attempt to match original speaker characteristics * `emotional_transfer` provides more expression but may be less stable # Delete Project Source: https://docs.dubformer.ai/platform/endpoints/projects/delete-project DELETE https://app.dubformer.ai/api/v1/projects/{project_id} Delete a specific project > [!WARNING] > > This action cannot be undone. All project data including output files, scripts, and processing results will be permanently deleted. ```bash cURL theme={null} curl -X DELETE https://app.dubformer.ai/api/v1/projects/{project_id} \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```python Python theme={null} import requests url = 'https://app.dubformer.ai/api/v1/projects/{project_id}' headers = { 'Authorization': 'Bearer YOUR_API_KEY', } response = requests.delete(url, headers=headers) print(response.json()) ``` ```javascript JavaScript theme={null} const url = 'https://app.dubformer.ai/api/v1/projects/{project_id}'; const headers = { 'Authorization': 'Bearer YOUR_API_KEY', }; fetch(url, { method: 'DELETE', headers, }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Path Parameters **project\_id** `string` *required* The unique identifier of the project to delete. ## Response **success** `boolean` Indicates whether the deletion was successful. ```json Success Response theme={null} { "success": true } ``` ## Error Responses ```json Project Not Found theme={null} { "error": "NotFoundError", "message": "Project not found" } ``` ```json Cannot Delete In Progress Project theme={null} { "error": "ValidationError", "message": "Cannot delete project while processing is in progress" } ``` ## Important Notes * Projects that are currently processing (`in_progress` status) cannot be deleted * Deleted projects cannot be recovered * This operation does not refund any minutes charged for the project * All download URLs associated with the project will become invalid # Get Project Source: https://docs.dubformer.ai/platform/endpoints/projects/get-project GET https://app.dubformer.ai/api/v1/projects/{project_id} Retrieve details of a specific project ```bash cURL theme={null} curl -X GET https://app.dubformer.ai/api/v1/projects/{project_id} \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```python Python theme={null} import requests url = 'https://app.dubformer.ai/api/v1/projects/{project_id}' headers = { 'Authorization': 'Bearer YOUR_API_KEY', } response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript JavaScript theme={null} const url = 'https://app.dubformer.ai/api/v1/projects/{project_id}'; const headers = { 'Authorization': 'Bearer YOUR_API_KEY', }; fetch(url, { method: 'GET', headers, }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Path Parameters **project\_id** `string` *required* The unique identifier of the project to retrieve. ## Response The response format varies depending on the project status. ### Common Fields **name** `string` Name of the project. **source\_lang** `string` Source language of the video. **target\_lang** `string` Target language for dubbing. **mixing\_mode** `string` Audio mixing mode used for the project. **cost\_minutes** `number` Number of minutes charged for this project. **created\_date** `string` ISO timestamp when the project was created. **status** `string` Current status: `in_progress`, `ready`, or `error`. ### Ready Project Fields **completion\_date** `string` ISO timestamp when processing completed. **output\_video\_url** `string` Download URL for the dubbed video file. **output\_tts\_audio\_url** `string` Download URL for the dubbed audio track. **output\_source\_script** `array` Array of source language script segments with timing information. **Script Object Properties** **start\_ms** `number` Start time in milliseconds. **end\_ms** `number` End time in milliseconds. **text** `string` Text content of the segment. **speaker\_id** `number` Unique identifier for the speaker. **output\_target\_script** `array` Array of target language script segments with timing information. Uses the same structure as `output_source_script`. **output\_target\_speakers** `array` Array of speaker configurations used for dubbing. **Speaker Object Properties** **speaker\_id** `number` Unique identifier for the speaker. **voice\_key** `string` Voice identifier used for this speaker. **style** `string` Voice style: `masculine` or `feminine`. ### In Progress Project Fields **estimated\_completion\_date** `string` ISO timestamp of estimated completion time. ### Error Project Fields **error\_message** `string` Description of the error that occurred during processing. ```json Ready Project theme={null} { "name": "My Project", "source_lang": "en", "target_lang": "fr-FR", "mixing_mode": "voiceover_with_original_track", "cost_minutes": 10, "created_date": "2024-06-01T12:00:00Z", "status": "ready", "completion_date": "2024-06-02T12:00:00Z", "output_video_url": "https://example.com/output_video.mp4", "output_tts_audio_url": "https://example.com/output_tts_audio.wav", "output_source_script": [ { "start_ms": 100, "end_ms": 1544, "text": "Hello world!", "speaker_id": 1 } ], "output_target_script": [ { "start_ms": 100, "end_ms": 1544, "text": "Bonjour le monde!", "speaker_id": 1 } ], "output_target_speakers": [ { "speaker_id": 1, "voice_key": "voice:Rachel", "style": "feminine" } ] } ``` ```json In Progress Project theme={null} { "name": "My Project", "source_lang": "en", "target_lang": "fr-FR", "mixing_mode": "voiceover_with_original_track", "cost_minutes": 10, "created_date": "2024-06-01T12:00:00Z", "status": "in_progress", "estimated_completion_date": "2024-06-05T12:00:00Z" } ``` ```json Error Project theme={null} { "name": "My Project", "source_lang": "en", "target_lang": "fr-FR", "mixing_mode": "voiceover_with_original_track", "cost_minutes": 10, "created_date": "2024-06-01T12:00:00Z", "status": "error", "error_message": "An error occurred during processing." } ``` # Get All Projects Source: https://docs.dubformer.ai/platform/endpoints/projects/get-projects GET https://app.dubformer.ai/api/v1/projects Retrieve a list of all projects ```bash cURL theme={null} curl -X GET https://app.dubformer.ai/api/v1/projects \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```python Python theme={null} import requests url = 'https://app.dubformer.ai/api/v1/projects' headers = { 'Authorization': 'Bearer YOUR_API_KEY', } response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript JavaScript theme={null} const url = 'https://app.dubformer.ai/api/v1/projects'; const headers = { 'Authorization': 'Bearer YOUR_API_KEY', }; fetch(url, { method: 'GET', headers, }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Response **projects** `array` Array of project objects with summary information. **Project Object Properties** **project\_id** `string` Unique identifier for the project. **name** `string` Name of the project. **status** `string` Current status: `in_progress`, `ready`, or `error`. **source\_lang** `string` Source language of the video. **target\_lang** `string` Target language for dubbing. **cost\_minutes** `number` Number of minutes charged for this project. **created\_date** `string` ISO timestamp when the project was created. ```json Success Response theme={null} { "projects": [ { "project_id": "12345", "name": "Project 1", "status": "ready", "source_lang": "en", "target_lang": "fr-FR", "cost_minutes": 10, "created_date": "2024-06-01T12:00:00Z" }, { "project_id": "67890", "name": "Project 2", "status": "in_progress", "source_lang": "fr", "target_lang": "de-DE", "cost_minutes": 15, "created_date": "2024-06-02T12:00:00Z" } ] } ``` ## Filtering and Pagination Currently, the API returns all projects for your account. Filtering and pagination parameters may be added in future versions. > [!NOTE] > > For detailed project information including output files and scripts, use the [Get Project](/platform/endpoints/projects/get-project) endpoint with a specific project ID. # Validate Re-translation Source: https://docs.dubformer.ai/platform/endpoints/projects/validate-retranslation POST https://app.dubformer.ai/api/v1/projects/{project_id}/validate-translation-request Validate re-translation request without creating it ```bash cURL theme={null} curl -X POST https://app.dubformer.ai/api/v1/projects/{project_id}/validate-translation-request \ -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" } ] }' ``` ```python Python theme={null} import requests url = 'https://app.dubformer.ai/api/v1/projects/{project_id}/validate-translation-request' 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" } ] } response = requests.post(url, headers=headers, json=data) print(response.json()) ``` ```javascript JavaScript theme={null} const url = 'https://app.dubformer.ai/api/v1/projects/{project_id}/validate-translation-request'; 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" } ] }; fetch(url, { method: 'POST', headers, body: JSON.stringify(data), }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Path Parameters **project\_id** `string` *required* The unique identifier of the project to validate against. ## Request Body The request body uses the same format as [Create Re-translation](/platform/endpoints/projects/create-retranslation). All the same parameters are accepted: **target\_script** `array` *required* Array of target language script segments for dubbing. **target\_speakers** `array` *required* Array of target speaker configurations for dubbing. **mixing\_mode** `string` Audio mixing mode for validation. **use\_fixed\_timings** `boolean` Whether to use fixed timings from the target script. **tts\_volume** `string` TTS volume level for validation. ## Response ### Valid Request **valid** `boolean` Always `true` when validation passes. ```json Valid Request Response theme={null} { "valid": true } ``` ### Invalid Request When validation fails, the response includes error details: **error** `string` Error type (e.g., "ValidationError"). **message** `string` Detailed error message explaining what's wrong. ```json Invalid Voice Error theme={null} { "error": "ValidationError", "message": "Unknown voice unknown-voice" } ``` ```json Missing Speaker Error theme={null} { "error": "ValidationError", "message": "Speaker ID 2 referenced in script but not found in target_speakers" } ``` ```json Invalid Timing Error theme={null} { "error": "ValidationError", "message": "Invalid timing: start_ms must be less than end_ms" } ``` ## Common Validation Errors ### Voice Validation * Unknown voice keys that don't exist in the system * Voice keys not compatible with the project's target language * Missing voice\_key in speaker configuration ### Speaker Validation * Speaker IDs in script don't match any target\_speakers entries * Duplicate speaker IDs in target\_speakers array * Missing required speaker fields (speaker\_id, voice\_key, style) ### Script Validation * Invalid timing values (start\_ms >= end\_ms) * Empty or missing text content * Invalid speaker\_id references * Overlapping time segments ### Language Compatibility * Voice doesn't support the project's target language * Special voice keys (soundalike, emotional\_transfer) used with unsupported languages # Error Handling Source: https://docs.dubformer.ai/platform/errors Understanding API errors and how to handle them ## Common Error Types ### ValidationError Occurs when request parameters are invalid or missing. ```json ValidationError Example theme={null} { "error": "ValidationError", "message": "source_lang is required" } ``` **Common causes:** * Missing required fields * Invalid language codes * Malformed request body * Invalid parameter values **How to fix:** * Check all required fields are provided * Validate language codes against [Get Options](/platform/endpoints/get-options) * Ensure request body is valid JSON ### UnauthorizedError Occurs when authentication fails. ```json UnauthorizedError Example theme={null} { "error": "UnauthorizedError", "message": "Invalid API key" } ``` **Common causes:** * Missing Authorization header * Invalid API key * Expired API key * Wrong API key for the environment **How to fix:** * Include `Authorization: Bearer YOUR_API_KEY` header * Verify your API key is correct and active * Generate a new API key if needed ### PaymentRequiredError Occurs when there's insufficient balance or [subscription](https://app.dubformer.ai/subscriptions) access is required. ```json PaymentRequiredError Example theme={null} { "error": "PaymentRequiredError", "message": "Insufficient balance for this project" } ``` **Common causes:** * Account balance too low * Feature requires [active subscription](https://app.dubformer.ai/subscriptions) * Plan limits exceeded **How to fix:** * Check balance with [Get Balance](/platform/endpoints/get-balance) * Top up your account * [Upgrade your subscription plan](https://app.dubformer.ai/subscriptions) ### VideoInfoError Occurs when there are issues with the provided video. ```json VideoInfoError Example theme={null} { "error": "VideoInfoError", "message": "Unable to process the provided video URL" } ``` **Common causes:** * Invalid video URL * Video file corrupted or inaccessible * Unsupported video format * Video too large or too long **How to fix:** * Verify video URL is accessible * Check video format is supported * Ensure video meets size/duration limits ### NotFoundError Occurs when a requested resource doesn't exist. ```json NotFoundError Example theme={null} { "error": "NotFoundError", "message": "Project not found" } ``` **Common causes:** * Invalid project ID * Resource was deleted * Wrong endpoint URL **How to fix:** * Verify the resource ID is correct * Check if the resource was deleted * Ensure you're using the correct endpoint ### RateLimitError Occurs when API rate limits are exceeded. ```json RateLimitError Example theme={null} { "error": "RateLimitError", "message": "Rate limit exceeded. Please try again later" } ``` **Rate limit headers:** ``` X-RateLimit-Limit: 100 X-RateLimit-Remaining: 0 X-RateLimit-Reset: 1640995200 ``` # Platform API Overview Source: https://docs.dubformer.ai/platform/overview Platform API overview and key concepts The Platform API provides direct access to Dubformer's video dubbing capabilities with full control over processing parameters. Perfect for developers building applications that need automated video localization. ## Base URL ``` https://app.dubformer.ai/api/v1 ``` ## Key Features ### 🎯 Direct Video Processing Submit video URLs and receive dubbed videos without intermediate steps. ### 🎭 Advanced Voice Control * Choose specific voices from our voice library * Use soundalike voices for natural results * Enable emotional transfer for expressive dubbing ### 🔊 Flexible Audio Mixing * **Voiceover Only**: Clean dubbed audio track * **Voiceover with Original**: Blend dubbed and original audio * **Smart Vocal Removal**: Replace original speech while preserving background audio ### 📝 Custom Content Support * Provide custom transcriptions * Upload translation glossaries * Fine-tune timing and speaker assignments ## What You Can Do 1. **Create Dubbing Projects** - Submit videos with target language and preferences 2. **Monitor Progress** - Track processing status in real-time 3. **Download Results** - Get dubbed video files and audio tracks 4. **Modify and Re-translate** - Update translations and regenerate audio 5. **Manage Projects** - List, update, and delete your projects ## Core Concepts ### Projects A project represents a single video dubbing task with specific source and target languages. ### Speakers Each speaker in the video can be assigned different voices and styles (masculine/feminine). ### Mixing Modes Control how the dubbed audio is mixed with the original video: * `voiceover_only` - Only the dubbed voice * `voiceover_with_original_track` - Dubbed voice + original audio * `voiceover_without_original_voice` - Dubbed voice + background audio only ### Voice Types * **Standard voices** - High-quality TTS voices * **Soundalike voices** - AI-generated voices that match original speaker characteristics * **Emotional transfer** - Advanced soundalike with emotional expression ## Supported Languages The Platform API supports: * **40+ source languages** for speech recognition * **100+ target languages** with locales for dubbing * Popular combinations like EN→ES, EN→FR, ES→EN, etc. Use the [Get Options](/platform/endpoints/get-options) endpoint to retrieve the full list. ## Pricing Model Projects are billed based on video duration: * Charged per minute of processed video * Different rates for standard vs. soundalike voices * Check your balance with the [Get Balance](/platform/endpoints/get-balance) endpoint # Authentication Source: https://docs.dubformer.ai/studio/authentication Learn how to authenticate with the Dubformer API The Dubformer API uses API keys to authenticate requests. You can view and manage your API keys in the [Dubformer Studio](https://studio.dubformer.ai/profile). All API requests must include your API key in the `Authorization` header: ```bash theme={null} Authorization: Bearer YOUR_API_KEY ``` > [!NOTE] > > Keep your API keys secure and do not share them in publicly accessible areas such as GitHub, client-side code, or public forums. ## Example Request Here's an example request to list your projects: ```bash theme={null} curl -X GET \ https://studio.dubformer.ai/api/v1/projects \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' ``` ## Rate Limiting The Dubformer API implements rate limiting to ensure fair usage and system stability. Current limits are: * 60 requests per minute per API key * 1000 requests per day per API key If you exceed these limits, you'll receive a `429 Too Many Requests` response. The response will include `Retry-After` header indicating how many seconds to wait before making another request. ### Project and video creation Creating projects and videos is also rate limited per organization. Only projects and videos created through the API count, including those deleted later. Projects and videos created in Dubformer Studio don't count. | Resource | Last hour | Last 6 hours | Last 24 hours | | - | - | - | - | | Projects, `POST /api/v1/projects/create` | 25 | 50 | 100 | | Videos, `POST /api/v1/projects/{projectId}/videos/create` | 100 | 150 | 300 | The windows are sliding. Contact your account manager if your organization needs higher limits. When a limit is reached, the request is rejected with `429 Too Many Requests`. The `Retry-After` header holds the number of seconds until the next project or video can be created, and the body names the limit: ```json theme={null} { "error": "Video creation limit reached: 100 videos per hour. Try again in 12 min.", "resource": "videos", "window": "1h", "limit": 100, "retryAfterSeconds": 720 } ``` ## Error Responses When authentication fails, you'll receive one of the following error responses: * **400 Bad Request**: Missing or invalid authorization token * **400 Bad Request**: Access denied to this project Example error response: ```json theme={null} { "error": "Missing or invalid authorization token" } ``` # Create Artifact Source: https://docs.dubformer.ai/studio/endpoints/artifacts/create-artifact-upload POST https://studio.dubformer.ai/api/v1/artifacts/create Create a new artifact from an uploaded file or external source This endpoint creates an artifact record and initiates file processing. Use this endpoint after uploading a file via presigned URL, or directly with external URLs/S3 paths. > [!NOTE] > > **Uploading a local file?** First get a presigned URL using [Get Presigned Upload URL](/studio/endpoints/artifacts/get-presigned-upload-url), upload your file, then use this endpoint with the S3 path. > [!NOTE] > > Can handle files up to 5GB. > [card] [Observe your artifacts](https://studio.dubformer.ai/artifacts) > > View and track all your artifacts and their processing status in real-time via the [Artifacts Dashboard](https://studio.dubformer.ai/artifacts). ## Request Body **name** `string` *required* Display name of the artifact. E.g., `My Project Video`. **type** `string` *required* Type of artifact. Must be one of: * `video` - Video files * `audio` - Audio files * `script` - Text/script files * `references` - A zip archive of reference recordings for a Voice lines video (up to 500 MB) ### Source Parameters Choose **exactly one** of the following parameters to specify your file source: **s3Path** `string` S3 path to the file. Can be: * Path from [Get Presigned Upload URL](/studio/endpoints/artifacts/get-presigned-upload-url) (e.g., `s3://dubformer-temp/uploads/aafa1753/file.mp4`) * External S3 bucket path (e.g., `s3://my-bucket/path/to/file.mp4`) - requires S3 credentials configured **Use when:** File is already in S3 or uploaded via presigned URL **url** `string` Direct URL to download the artifact from an external source. Must be a publicly accessible URL. The file will be downloaded asynchronously. **Use when:** File is hosted on a CDN, public storage, or web server **fragments** `array` Array of media fragments to concatenate into a single artifact. Not supported for `script` type. Each fragment object must contain: * `url` or `s3Path` - source location * `timePositionMs` - start time in milliseconds (must be >= 0) Optional trimming fields (audio only): * `timeInMs` - trim start position within the source file in milliseconds (must be >= 0). If omitted, trimming starts from the beginning * `timeOutMs` - trim end position within the source file in milliseconds (must be > timeInMs when both are provided). If omitted, trimming goes to the end When specified, only the matching portion is extracted from the source and placed at `timePositionMs` in the final artifact. All fragments must have the same format (codec, resolution, frame rate). Fragments are sorted by `timePositionMs` and gaps between them are filled with silence (audio) or black frames (video). **Use when:** Combining multiple clips (or portions of clips) into one file **artifactDurationMs** `number` Target duration of the final artifact in milliseconds. Can only be used with `audio` type `fragments`. When specified, the concatenated result is adjusted to match this exact duration: * If the result is shorter, silence is appended * If the result is longer, it is trimmed **Use when:** You need the audio artifact to have a precise duration (e.g., matching a source video length) > [!TIP] > > **Using external AWS S3?** To enable external S3 paths or S3 fragments, configure AWS credentials for your API key in Dashboard Settings → API Keys → Select your key → S3 Credentials. ## Response Returns a complete artifact object: **id** `string` Unique identifier for the artifact. Use this to retrieve artifact status or use in other endpoints. **name** `string` Display name of the artifact. **type** `string` Type of artifact: `video`, `audio`, or `script`. **status** `string` Current processing status. Possible values: * `created` - Artifact created, processing pending * `upload_started` - File is being downloaded/copied/processed * `upload_completed` - File is ready for use * `upload_failed` - Processing failed (check `errorMessage`) **uploadMethod** `string` Upload method used: * `direct_url` - Presigned upload, direct URL, or S3 path * `fragments` - Fragment concatenation **size** `number | null` File size in bytes. Will be `null` until processing completes. **duration** `number | null` Duration in seconds (for video/audio). Will be `null` until processing completes or for script type. **errorMessage** `string | null` Error message if processing failed. Will be `null` unless status is `upload_failed`. **s3Path** `string` Internal S3 path where the artifact file is stored (without bucket prefix). **s3Bucket** `string` S3 bucket name where the artifact is stored. **createdAt** `string` ISO 8601 timestamp when the artifact was created. **updatedAt** `string` ISO 8601 timestamp when the artifact was last updated. **company** `object | undefined` Company information object containing `id` and `name` fields. **createdBy** `object | undefined` User information object containing `id` and `name` fields for the user who created the artifact. ## Request Examples ```bash Presigned Upload theme={null} # After uploading file via presigned URL curl -X POST \ https://studio.dubformer.ai/api/v1/artifacts/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "My Source Video", "type": "video", "s3Path": "s3://dubformer-artifacts/temp/550e8400-e29b-41d4-a716-446655440000/video.mp4" }' ``` ```bash Direct URL theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/artifacts/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Marketing Video", "type": "video", "url": "https://cdn.example.com/videos/promo.mp4" }' ``` ```bash External S3 Path theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/artifacts/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Archive Video", "type": "video", "s3Path": "s3://my-company-bucket/recordings/meeting-2024.mp4" }' ``` ```bash Fragments (Video) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/artifacts/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Concatenated Video", "type": "video", "fragments": [ { "url": "https://example.com/intro.mp4", "timePositionMs": 0 }, { "url": "https://example.com/main.mp4", "timePositionMs": 10000 }, { "url": "https://example.com/outro.mp4", "timePositionMs": 300000 } ] }' ``` ```bash Fragments (Audio with trimming) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/artifacts/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Trimmed and Concatenated Audio", "type": "audio", "fragments": [ { "url": "https://example.com/full-recording.wav", "timePositionMs": 0, "timeInMs": 5000, "timeOutMs": 15000 }, { "url": "https://example.com/full-recording.wav", "timePositionMs": 10000, "timeInMs": 60000, "timeOutMs": 90000 } ] }' ``` ```bash Fragments (Audio with exact duration) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/artifacts/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Concatenated Audio", "type": "audio", "fragments": [ { "url": "https://example.com/segment1.wav", "timePositionMs": 0 }, { "url": "https://example.com/segment2.wav", "timePositionMs": 120500 } ], "artifactDurationMs": 360000 }' ``` ```javascript JavaScript theme={null} const response = await fetch( 'https://studio.dubformer.ai/api/v1/artifacts/create', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'My Source Video', type: 'video', s3Path: 's3://dubformer-artifacts/temp/550e8400-e29b-41d4-a716-446655440000/video.mp4' }) } ); const artifact = await response.json(); console.log(artifact); ``` ```python Python theme={null} import requests response = requests.post( 'https://studio.dubformer.ai/api/v1/artifacts/create', headers={ 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, json={ 'name': 'My Source Video', 'type': 'video', 's3Path': 's3://dubformer-artifacts/temp/550e8400-e29b-41d4-a716-446655440000/video.mp4' } ) artifact = response.json() print(artifact) ``` ```json Response theme={null} { "id": "67a8f9b0c1d2e3f4g5h6i7j8", "name": "My Source Video", "type": "video", "status": "created", "uploadMethod": "direct_url", "size": null, "duration": null, "errorMessage": null, "s3Path": "uploads/67a8f9b0c1d2e3f4g5h6i7j8/video.mp4", "s3Bucket": "dubformer-artifacts", "createdAt": "2026-02-04T12:00:00.000Z", "updatedAt": "2026-02-04T12:00:00.000Z", "company": { "id": "507f1f77bcf86cd799439011", "name": "Acme Inc" }, "createdBy": { "id": "507f191e810c19729de860ea", "name": "John Doe" } } ``` ## Processing Workflow **1. Create Artifact** Send a POST request with one of the source parameters (`s3Path`, `url`, or `fragments`). The artifact is created with `created` status. **2. Background Processing** The file is downloaded/copied/processed asynchronously. Status transitions to `upload_started` during processing. **3. Completion** When processing completes: * Status becomes `upload_completed` (success) or `upload_failed` (error) * `size` and `duration` fields are populated * If failed, check `errorMessage` for details **4. Monitor Status** Use [Get Artifact](/studio/endpoints/artifacts/get-artifact) to check processing status: ```bash theme={null} GET /api/v1/artifacts/{artifactId} ``` > [!WARNING] > > Artifact processing happens asynchronously. The artifact is created immediately, but the file may not be ready for use until status is `upload_completed`. Always check the status before using the artifact. ## See Also * [Artifacts Overview](/studio/endpoints/artifacts/overview) - Choose the right upload method * [Get Presigned Upload URL](/studio/endpoints/artifacts/get-presigned-upload-url) - Upload local files * [Get Artifact](/studio/endpoints/artifacts/get-artifact) - Check processing status # Get Artifact Source: https://docs.dubformer.ai/studio/endpoints/artifacts/get-artifact GET https://studio.dubformer.ai/api/v1/artifacts/{artifactId} Retrieve detailed information about an artifact ## Path Parameters **artifactId** `string` *required* The unique identifier of the artifact to retrieve. ## Response **id** `string` Unique identifier of the artifact. **name** `string` Display name of the artifact. **type** `string` Type of artifact. One of: `video`, `audio`, or `script`. **status** `string` Current upload/processing status. One of: * `created` - Artifact created, processing pending * `upload_started` - Processing in progress * `upload_completed` - Processing completed successfully * `upload_failed` - Processing failed **uploadMethod** `string` Method used to upload the artifact. One of: * `direct_url` - Uploaded via presigned URL, direct URL, or S3 path * `fragments` - Created from concatenated fragments **size** `number | null` File size in bytes. Null if not yet processed. **duration** `number | null` Duration in seconds for video/audio artifacts. Null for script type or if not yet processed. **errorMessage** `string | null` Error message if upload/processing failed. Null if no error occurred. **createdAt** `string` ISO timestamp when the artifact was created. **updatedAt** `string` ISO timestamp when the artifact was last updated. **s3Path** `string` Internal S3 storage path where the artifact file is stored. **company** `object` Company information associated with the artifact. **properties** **id** `string` Unique identifier of the company. **createdBy** `object` User who created the artifact. **properties** **id** `string` Unique identifier of the user. ```bash cURL theme={null} curl -X GET \ https://studio.dubformer.ai/api/v1/artifacts/1a2b3c4d5e6f7g8h9i0j \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const artifactId = '1a2b3c4d5e6f7g8h9i0j'; const response = await axios.get( `https://studio.dubformer.ai/api/v1/artifacts/${artifactId}`, { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); console.log(response.data); ``` ```json Response theme={null} { "id": "694eb201f9fc340f3ae47280", "name": "Source Audio", "type": "audio", "status": "upload_completed", "uploadMethod": "fragments", "size": 6638526, "duration": 138.301, "errorMessage": null, "createdAt": "2025-12-26T16:04:17.367Z", "updatedAt": "2026-01-12T14:42:59.985Z", "s3Path": "uploads/694eb201f9fc340f3ae47280/source_video.wav", "company": { "id": "6686801a54e7c52988dbc531" }, "createdBy": { "id": "68517bac632d23eb88bf8e5c" } } ``` > [!NOTE] > > This endpoint returns metadata about the artifact, including the internal S3 storage path. Note that the S3 path is provided for reference but direct access requires proper authentication and authorization. # Get Presigned Upload URL Source: https://docs.dubformer.ai/studio/endpoints/artifacts/get-presigned-upload-url GET https://studio.dubformer.ai/api/v1/artifacts/create Get a temporary presigned URL to upload local files directly to S3 This endpoint generates a presigned S3 URL that allows you to upload files directly to Dubformer's storage. This is the first step when uploading local files. > [!NOTE] > > **Use this endpoint for local file uploads only.** If your file is already hosted on a URL or in S3, you can skip this step and go directly to [Create Artifact](/studio/endpoints/artifacts/create-artifact-upload). ## Query Parameters **fileName** `string` *required* Name of the file with extension (e.g., `video.mp4`, `audio.wav`, `script.txt`). This is the actual file name, not the artifact display name. The extension is used to determine the file type. ## Response **s3Path** `string` S3 path where the file will be stored. You'll need this path when creating the artifact in Step 2. **presignedUploadUrl** `string` Temporary presigned URL for uploading your file. Use this URL to upload via PUT request. **expiresAt** `string` ISO 8601 timestamp when the presigned URL expires. Typically 24 hours from generation. ## Example Request ```bash cURL theme={null} curl -X GET \ 'https://studio.dubformer.ai/api/v1/artifacts/create?fileName=my-video.mp4' \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```javascript JavaScript theme={null} const response = await fetch( 'https://studio.dubformer.ai/api/v1/artifacts/create?fileName=my-video.mp4', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const data = await response.json(); console.log(data); ``` ```python Python theme={null} import requests response = requests.get( 'https://studio.dubformer.ai/api/v1/artifacts/create', params={'fileName': 'my-video.mp4'}, headers={'Authorization': 'Bearer YOUR_API_KEY'} ) data = response.json() print(data) ``` ```json Response theme={null} { "s3Path": "s3://dubformer-artifacts/temp/550e8400-e29b-41d4-a716-446655440000/my-video.mp4", "presignedUploadUrl": "https://storage.dubformer.ai/uploads/67a8f9b0c1d2e3f4g5h6i7j8/source_video.mp4?X-Amz-Algorithm=...", "expiresAt": "2026-02-04T12:30:00.000Z" } ``` ## Next Step: Upload Your File After receiving the presigned URL, upload your file using a PUT request: ```bash cURL theme={null} curl -X PUT \ "PRESIGNED_UPLOAD_URL_FROM_RESPONSE" \ -H 'Content-Type: application/octet-stream' \ --data-binary '@/path/to/your/my-video.mp4' ``` ```javascript JavaScript theme={null} const file = document.getElementById('fileInput').files[0]; const uploadResponse = await fetch(presignedUploadUrl, { method: 'PUT', body: file, headers: { 'Content-Type': 'application/octet-stream' } }); if (uploadResponse.ok) { console.log('File uploaded successfully'); } ``` ```python Python theme={null} with open('/path/to/your/my-video.mp4', 'rb') as file: upload_response = requests.put( presigned_upload_url, data=file, headers={'Content-Type': 'application/octet-stream'} ) if upload_response.status_code == 200: print('File uploaded successfully') ``` > [!WARNING] > > The presigned URL expires after the time specified in `expiresAt` (typically 24 hours). Make sure to complete your upload before this time. ## Final Step: Create Artifact After successfully uploading your file, create the artifact record using the `s3Path` from the response. > [card] [Create Artifact](/studio/endpoints/artifacts/create-artifact-upload) > > See full details on creating an artifact record # Overview Source: https://docs.dubformer.ai/studio/endpoints/artifacts/overview Understanding artifact upload methods and choosing the right approach Artifacts are source files (video, audio, or script) that you upload to Dubformer Studio for processing. There are multiple ways to upload artifacts depending on where your files are located and your use case. ## Upload Methods ### 1. Presigned Upload (Local Files) **When to use:** Uploading files from your local machine, client applications, or when you need direct upload control. **How it works:** 1. Request a presigned URL via GET request 2. Upload your file directly to S3 using the presigned URL 3. Create the artifact record via POST request with the S3 path > [card] [Get Presigned Upload URL](/studio/endpoints/artifacts/get-presigned-upload-url) > > Learn how to get a presigned URL for uploading local files ### 2. Direct URL Upload **When to use:** Your file is already hosted on a publicly accessible URL. **How it works:** 1. Send a POST request with the file URL 2. Dubformer downloads the file asynchronously > [card] [Create Artifact from URL](/studio/endpoints/artifacts/create-artifact-upload) > > Learn how to create artifacts from public URLs ### 3. S3 Path Upload **When to use:** Your file is already in an AWS S3 bucket. **How it works:** 1. Configure S3 credentials in your [Studio Profile](https://studio.dubformer.ai/profile) -> API Keys -> Add S3 credentials 2. Send a POST request with the S3 path 3. Dubformer downloads the file asynchronously > [card] [Create Artifact from S3](/studio/endpoints/artifacts/create-artifact-upload) > > Learn how to create artifacts from S3 buckets ### 4. Fragment Concatenation **When to use:** You need to combine multiple video/audio clips into a single artifact. **How it works:** 1. Send a POST request with an array of fragments (each with URL or S3 path) 2. Dubformer downloads/copies and concatenates them **Limitations:** Not supported for script type artifacts. All fragments must have the same format (codec, resolution, frame rate). > [card] [Create Artifact from Fragments](/studio/endpoints/artifacts/create-artifact-upload) > > Learn how to concatenate multiple clips into one artifact ## Processing Status All upload methods create an artifact with `created` status initially. The artifact will transition through these states: * `created` - Artifact created, processing pending * `upload_started` - File is being downloaded/copied/processed * `upload_completed` - File is ready for use * `upload_failed` - Processing failed (check `errorMessage` field) > [card] [Get Artifact Status](/studio/endpoints/artifacts/get-artifact) > > Learn how to monitor artifact processing status # Create Project Source: https://docs.dubformer.ai/studio/endpoints/projects/create-project POST https://studio.dubformer.ai/api/v1/projects/create Create a new project with general project information ## Request Body **name** `string` *required* Name of the project. **managerEmail** `string` Email of the project manager. If not provided, the API key user will be used as the manager. **translationsGlossaryId** `string` Optional ID of a translation glossary to be used for this project. **voicesGlossaryId** `string` Optional ID of a voices glossary to be used for this project. **pronunciationGlossaryId** `string` Optional ID of a pronunciation glossary to be used for this project. **folderId** `string` Optional ID of an existing folder in your company. The project is created inside that folder. Omit this field to create the project at the company root. **remark** `string` Optional remarks for the project. ## Response **id** `string` Unique project identifier. **name** `string` Name of the project. **status** `string` Current status of the project. **translationGlossary** `string | null` ID of the translation glossary, if any. **voicesGlossary** `string | null` ID of the voices glossary, if any. **pronunciationGlossary** `string | null` ID of the pronunciation glossary, if any. **remark** `string | null` Project remarks, if any. **clientName** `string | null` Client name, if specified. **folderId** `string | null` ID of the folder that contains the project, or `null` if the project is at the company root. **projectUrl** `string` URL to access the project in the web app. **createdAt** `string` ISO 8601 timestamp when the project was created. **updatedAt** `string` ISO 8601 timestamp when the project was last updated. ```bash cURL theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/projects/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Marketing Campaign 2023", "managerEmail": "manager@company.com", "translationsGlossaryId": "gloss_5f83a14b2ec1b", "voicesGlossaryId": "voices_7c92e3a1f56d8", "pronunciationGlossaryId": "pron_3a91c7d2e84f5", "folderId": "folder_5f83a14b2ec1b" }' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.post( 'https://studio.dubformer.ai/api/v1/projects/create', { name: "Marketing Campaign 2023", managerEmail: "manager@company.com", translationsGlossaryId: "gloss_5f83a14b2ec1b", voicesGlossaryId: "voices_7c92e3a1f56d8", pronunciationGlossaryId: "pron_3a91c7d2e84f5", folderId: "folder_5f83a14b2ec1b" }, { headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } } ); console.log(response.data); ``` ```json Response theme={null} { "id": "proj_5f83a14b2ec1b", "name": "Marketing Campaign 2023", "status": "new", "translationGlossary": "gloss_5f83a14b2ec1b", "voicesGlossary": "voices_7c92e3a1f56d8", "pronunciationGlossary": "pron_3a91c7d2e84f5", "remark": "Created via Dubformer Studio API", "clientName": null, "folderId": "folder_5f83a14b2ec1b", "projectUrl": "https://studio.dubformer.ai/projects/proj_5f83a14b2ec1b", "createdAt": "2023-12-01T10:00:00.000Z", "updatedAt": "2023-12-01T10:00:00.000Z" } ``` ```json 429 Response theme={null} { "error": "Project creation limit reached: 25 projects per hour. Try again in 17 min.", "resource": "projects", "window": "1h", "limit": 25, "retryAfterSeconds": 1020 } ``` ## Notes > [!NOTE] > > Project creation is rate limited per organization. Over the limit the endpoint returns `429` with a `Retry-After` header. See [Rate Limiting](/studio/authentication#rate-limiting). > [!NOTE] > > This endpoint creates a project with basic information only. Videos can be added to the project using separate video management endpoints. > [!NOTE] > > The `managerEmail` must be a user from the same company as the API key owner. If not provided, the API key owner becomes the project manager. > [!NOTE] > > Translation, voices and pronunciation glossaries are optional but must exist and belong to your organization if provided. > [!NOTE] > > `folderId` must belong to the same company as the API key owner and must not be deleted. Omit it to keep the current behavior of creating the project at the company root. # Delete Project Source: https://docs.dubformer.ai/studio/endpoints/projects/delete-project DELETE https://studio.dubformer.ai/api/v1/projects/{projectId} Delete a specific project This endpoint allows you to delete a project. The project will be marked as deleted and will no longer be accessible through the API. ## Path Parameters **projectId** `string` *required* The unique identifier of the project to delete. ## Response **deleted** `boolean` Indicates whether the project was successfully deleted. Always `true` on success. ```bash cURL theme={null} curl -X DELETE \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.delete( 'https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); console.log(response.data); ``` ```json Response theme={null} { "deleted": true } ``` ## Notes * Once a project is deleted, it cannot be recovered * Deleted projects will not appear in the list of projects * All associated data (videos, translations, etc.) will be marked as deleted * The project ID will remain valid for reference purposes but the project will be inaccessible # Get Project Source: https://docs.dubformer.ai/studio/endpoints/projects/get-project GET https://studio.dubformer.ai/api/v1/projects/{projectId} Retrieve information about a specific project ## Path Parameters **projectId** `string` *required* The unique identifier of the project to retrieve. ## Response **id** `string` Unique project identifier. **name** `string` Name of the project. **status** `string` Current status of the project. **translationGlossary** `string | null` ID of the translation glossary, if any. **voicesGlossary** `string | null` ID of the voices glossary, if any. **pronunciationGlossary** `string | null` ID of the pronunciation glossary, if any. **remark** `string | null` Project remarks, if any. **clientName** `string | null` Client name, if specified. **folderId** `string | null` ID of the folder that contains the project, or `null` if the project is at the company root. **projectUrl** `string` URL to access the project in the web app. **createdAt** `string` ISO 8601 timestamp when the project was created. **updatedAt** `string` ISO 8601 timestamp when the project was last updated. ```bash cURL theme={null} curl -X GET \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const projectId = 'proj_5f83a14b2ec1b'; const response = await axios.get( `https://studio.dubformer.ai/api/v1/projects/${projectId}`, { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); console.log(response.data); ``` ```json Response theme={null} { "id": "proj_5f83a14b2ec1b", "name": "Marketing Campaign 2023", "status": "new", "translationGlossary": "gloss_5f83a14b2ec1b", "voicesGlossary": "voices_7c92e3a1f56d8", "pronunciationGlossary": "pron_3a91c7d2e84f5", "remark": "Urgent project for Q4 launch", "clientName": "Acme Corp", "folderId": "folder_5f83a14b2ec1b", "projectUrl": "https://studio.dubformer.ai/projects/proj_5f83a14b2ec1b", "createdAt": "2023-12-01T10:00:00.000Z", "updatedAt": "2023-12-01T15:30:00.000Z" } ``` ## Usage Notes > [!NOTE] > > Use this endpoint to get basic information about a project. For detailed information about each video, use the Get Project Video endpoint. # List Projects Source: https://docs.dubformer.ai/studio/endpoints/projects/list-projects GET https://studio.dubformer.ai/api/v1/projects Retrieve a list of all projects This endpoint returns a list of all projects that the authenticated user has access to. ## Response Returns an array of project objects, each containing the following fields: **id** `string` Unique project identifier. **name** `string` Name of the project. **status** `string` Current status of the project. **translationGlossary** `string | null` ID of the translation glossary, if any. **voicesGlossary** `string | null` ID of the voices glossary, if any. **pronunciationGlossary** `string | null` ID of the pronunciation glossary, if any. **remark** `string | null` Project remarks, if any. **clientName** `string | null` Client name, if specified. **folderId** `string | null` ID of the folder that contains the project, or `null` if the project is at the company root. **projectUrl** `string` URL to access the project in the web app. **createdAt** `string` ISO 8601 timestamp when the project was created. **updatedAt** `string` ISO 8601 timestamp when the project was last updated. ```bash cURL theme={null} curl -X GET \ https://studio.dubformer.ai/api/v1/projects \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.get( 'https://studio.dubformer.ai/api/v1/projects', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); console.log(response.data); ``` ```json Response theme={null} [ { "id": "proj_5f83a14b2ec1b", "name": "Marketing Campaign 2023", "status": "new", "translationGlossary": "gloss_5f83a14b2ec1b", "voicesGlossary": "voices_7c92e3a1f56d8", "pronunciationGlossary": "pron_3a91c7d2e84f5", "remark": "Urgent project for Q4 launch", "clientName": "Acme Corp", "folderId": "folder_5f83a14b2ec1b", "projectUrl": "https://studio.dubformer.ai/projects/proj_5f83a14b2ec1b", "createdAt": "2023-12-01T10:00:00.000Z", "updatedAt": "2023-12-01T15:30:00.000Z" }, { "id": "proj_6e74b25c3fd2a", "name": "Company Training Videos", "status": "in_progress", "translationGlossary": null, "voicesGlossary": null, "pronunciationGlossary": null, "remark": null, "clientName": "Internal", "folderId": null, "projectUrl": "https://studio.dubformer.ai/projects/proj_6e74b25c3fd2a", "createdAt": "2023-11-15T08:00:00.000Z", "updatedAt": "2023-12-01T12:00:00.000Z" } ] ``` ## Notes > [!NOTE] > > Projects are returned in descending order by creation date (newest first). > [!NOTE] > > Only projects belonging to the authenticated user's company are returned. # Update Project Source: https://docs.dubformer.ai/studio/endpoints/projects/update-project PATCH https://studio.dubformer.ai/api/v1/projects/{projectId} Update basic information of an existing project ## Path Parameters **projectId** `string` *required* Unique identifier of the project to update. ## Request Body **name** `string` New name for the project. **managerEmail** `string` Email of the new project manager. The manager must belong to the same company as the API key user. **translationsGlossaryId** `string` ID of a translation glossary to be used for this project. Pass empty string to remove. **voicesGlossaryId** `string` ID of a voices glossary to be used for this project. Pass empty string to remove. **pronunciationGlossaryId** `string` ID of a pronunciation glossary to be used for this project. Pass empty string to remove. ## Response **id** `string` Unique project identifier. **name** `string` Name of the project. **status** `string` Current status of the project. **translationGlossary** `string | null` ID of the translation glossary, if any. **voicesGlossary** `string | null` ID of the voices glossary, if any. **pronunciationGlossary** `string | null` ID of the pronunciation glossary, if any. **remark** `string | null` Project remarks, if any. **clientName** `string | null` Client name, if specified. **folderId** `string | null` ID of the folder that contains the project, or `null` if the project is at the company root. **projectUrl** `string` URL to access the project in the web app. **createdAt** `string` ISO 8601 timestamp when the project was created. **updatedAt** `string` ISO 8601 timestamp when the project was last updated. ```bash cURL theme={null} curl -X PATCH \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Updated Marketing Campaign 2023", "managerEmail": "new.manager@company.com", "translationsGlossaryId": "gloss_new_5f83a14b2ec1b", "voicesGlossaryId": "", "pronunciationGlossaryId": "pron_3a91c7d2e84f5" }' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.patch( 'https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b', { name: "Updated Marketing Campaign 2023", managerEmail: "new.manager@company.com", translationsGlossaryId: "gloss_new_5f83a14b2ec1b", voicesGlossaryId: "", pronunciationGlossaryId: "pron_3a91c7d2e84f5" }, { headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } } ); console.log(response.data); ``` ```json Response theme={null} { "id": "proj_5f83a14b2ec1b", "name": "Updated Marketing Campaign 2023", "status": "new", "translationGlossary": "gloss_new_5f83a14b2ec1b", "voicesGlossary": null, "pronunciationGlossary": "pron_3a91c7d2e84f5", "remark": "Created via Dubformer Studio API", "clientName": null, "folderId": "folder_5f83a14b2ec1b", "projectUrl": "https://studio.dubformer.ai/projects/proj_5f83a14b2ec1b", "createdAt": "2023-12-01T10:00:00.000Z", "updatedAt": "2023-12-01T16:45:00.000Z" } ``` ## Notes > [!NOTE] > > This endpoint updates only basic project information. Videos can be managed using separate video management endpoints. > [!NOTE] > > The `managerEmail` must be a user from the same company as the API key owner. If not provided, the API key owner becomes the project manager. > [!NOTE] > > Translation, voices and pronunciation glossaries must exist and belong to your organization if provided. Pass an empty string to remove an existing glossary assignment. # Attaching Scripts Source: https://docs.dubformer.ai/studio/endpoints/videos/attaching-scripts Attach a ready-made source transcript or target translations when creating a video When you [create a video](/studio/endpoints/videos/create-project-video) you can attach ready-made scripts instead of transcribing or translating from scratch: * **`sourceScript`** — the original-language transcript. Attaching it skips transcription. * **`targetScripts`** — finished translations, keyed by target language. Each key must be present in `targetLanguages`. Scripts can only be attached at video creation time. ### Which workflows accept scripts | `workflowType` | `sourceScript` | `targetScripts` | | - | :-: | :-: | | `dubbing` | ✓ | ✓ | | `voiceover` | ✓ | ✓ | | `audio_description` | ✓ | ✓ | | `transcription` | ✓ | — | | `translation` | ✓ | ✓ | | `subtitling` | ✓ | — | | `tts` (Voice lines) | ✓ **required** | — | Each script references the `artifactId` of an [already-uploaded artifact](/studio/endpoints/artifacts/overview) of type `script`, plus [optional settings](#import-settings). `sourceScript` and every `targetScripts` entry have the same shape. ```json theme={null} { "sourceScript": { "artifactId": "artifact_7c9a1f04b2e8" }, "targetScripts": { "es-ES": { "artifactId": "artifact_3b1d68f9a05c" }, "fr-FR": { "artifactId": "artifact_e42a7b3c9106", "columns": { "text": "Line", "startTime": "In", "endTime": "Out" } } } } ``` ## Supported formats | Format | Columns | | - | - | | **VTT / SRT / TTML** | Defined by the format; no `columns` needed. | | **XLSX / XLS / CSV** | Map each column to a role with `columns`. | Maximum file size: **50 MB**. ## Import settings Optional, inline next to `artifactId`. Format restrictions are noted where they apply. **columns** `object` **XLSX / XLS / CSV only.** Maps each script field to a column, addressed one of two ways: * by header **name** (string) * by zero-based **index** (number) Both can be mixed in one map. | Script field | Description | | - | - | | `text` | Chunk text. **Required.** | | `startTime` | Start timecode. | | `endTime` | End timecode. | | `speakerTag` | Speaker tag, e.g. `M0`, `F1`. | | `speakerName` | Speaker display name, or `non-voiced` to mark the chunk non-voiced. | | `outputFileName` | **Voice lines.** Name of the delivered audio file. Lines sharing a name are joined into one file in script order; `.wav` is appended if missing. Without it every line becomes its own file. | | `inputFileName` | **Voice lines.** Name of the line's reference recording inside the references archive, matched by name or by name without extension. | | `speechPrompt` | **Voice lines.** Direction for the line (e.g. `calm, warm`). Becomes an inline tag for ElevenLabs v3 voices and a synthesis prompt elsewhere. | | `section`, `context`, `timeConstraints` | **Voice lines.** Notes shown to the editor. They do not affect synthesis. | A `non-voiced` value in either speaker column is honored only in `fromFile` speaker mode. Addressing any column by **name** forces `skipFirstRow` to `true` (row 0 is the header) — even if you pass `false`. With **index**-only addressing no header is assumed; set `skipFirstRow: true` yourself if the file has one. ```json theme={null} { "columns": { "text": "Line", "startTime": "In", "endTime": "Out", "speakerName": "Character" } } ``` **skipFirstRow** `boolean` **XLSX / XLS / CSV only.** Drop row 0 (a header row). Implied `true` when any column is addressed by name. **sheet** `string | number` **XLSX / XLS only.** Which sheet to read, by name or zero-based index. Defaults to the first. **timingsMode** `string` Where chunk timings come from: * `fromFile` (default) — read start and end from the file. * `estimateEnd` — read start from the file, estimate each end from the text length. * `auto` — detected by the backend from the media. Not available with a `pivotLanguage`. **speakersMode** `string` Where speakers come from: * `fromFile` (default) — read from the file. * `constant` — a single speaker on every chunk (requires `constantSpeakerId`). * `auto` — detected by the backend from the media. Not available with a `pivotLanguage`. **constantSpeakerId** `string` Speaker assigned in `constant` mode: `M0` (male) or `F0` (female). Required when `speakersMode` is `constant`. **shiftMs** `number` Shift every timing by this many milliseconds (may be negative). **frameRate** `number` Required when the file uses **SMPTE timecodes** — `HH:MM:SS:FF`, where the last field `FF` counts **frames**, not milliseconds. Converting such a timecode to a real time needs the frame rate. The request is rejected if SMPTE timecodes are detected without it. Must be one of: `16`, `23.98`, `24`, `25`, `29.97`, `30`, `50`, `59.94`, `60`. ## Examples Plain VTT — artifact only: ```json theme={null} { "sourceScript": { "artifactId": "artifact_7c9a1f04b2e8" } } ``` VTT with a single speaker and a timing shift: ```json theme={null} { "sourceScript": { "artifactId": "artifact_7c9a1f04b2e8", "speakersMode": "constant", "constantSpeakerId": "F0", "shiftMs": -500 } } ``` XLSX with a header row, columns by name, SMPTE timecodes: ```json theme={null} { "sourceScript": { "artifactId": "artifact_9d05c3a17f6b", "columns": { "text": "Dialogue", "startTime": "In", "endTime": "Out", "speakerName": "Character" }, "frameRate": 25 } } ``` Headerless CSV, columns by index: ```json theme={null} { "sourceScript": { "artifactId": "artifact_2f8b41e0c93a", "columns": { "text": 2, "startTime": 0, "endTime": 1 } } } ``` ## Validation Scripts are validated before the video is created; on any error the request fails with `400` and no video is created. A script is rejected when: * a chunk has no text, an invalid or missing timing, a start at or after its end, a duration under 100 ms, or a timing beyond the video length; * a required column is missing, or an unknown sheet/column name is referenced; * SMPTE timecodes are present without `frameRate`; * an `auto` mode (`timingsMode` or `speakersMode`) is combined with a `pivotLanguage`; * the file is too large (returns `413`). Non-voiced chunks skip the text and minimum-duration checks, but their timing must still be valid and within the video. # Create Project Video Source: https://docs.dubformer.ai/studio/endpoints/videos/create-project-video POST /api/v1/projects/{projectId}/videos/create Add a new video to an existing project This endpoint allows you to add a new video to an existing project. The video will be uploaded to the pipeline for processing. ## Path Parameters **projectId** `string` *required* The unique identifier of the project. ## Request Body **name** `string` *required* Name of the video. **workflowType** `string` *required* Type of video processing (e.g., `dubbing`, `voiceover`, `audio_description`, `transcription`, `translation`, `subtitling`, `tts`). `tts` is the **Voice lines** workflow: there is no source video — a script is voiced line by line into separate audio files. See [Voice lines](#voice-lines) below for what changes in the request. **sourceArtifactId** `string` Artifact ID of the source video (must be uploaded beforehand). **Required** for every workflow except `tts`, where it must be omitted — the script is the source. **sourceLanguage** `string` *required* Source language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format (e.g., `en`, `ru`, `de`). You can also pass `multi` to enable multi-language source mode, where the source video contains speech in multiple languages. In this mode, the system will automatically detect the language of each segment. > [!NOTE] > > The `multi` option must be enabled for your organization by an administrator. Contact your account manager to activate multi-language source support. **sourceLanguageWhitelist** `array` Optional list of source language codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format (e.g., `["en", "ru", "de"]`) to restrict automatic language detection to a known subset. Only allowed when `sourceLanguage` is `multi`. Omit the field to detect any supported language. When provided, it must be a non-empty array. **targetLanguages** `array` *required* Array of target language codes in [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) format — a combination of an ISO 639-1 language code and an ISO 3166-1 Alpha-2 region code (e.g., `es-ES`, `fr-FR`, `en-US`). **sourceScript** `object` Attach a ready-made **source script** (the original-language transcript) instead of having it transcribed. Optional.
  • `artifactId` (string, required): Artifact ID of the uploaded script file. Must be an artifact of type `script`.
  • Optional import settings inline alongside `artifactId`.
See [Attaching Scripts](/studio/endpoints/videos/attaching-scripts) for supported formats, settings and examples. **targetScripts** `object` Attach ready-made **target scripts** (finished translations) per language. Optional. An object where each key is a target language code that must be present in `targetLanguages`, and each value has the same shape as `sourceScript`. Accepted for `dubbing`, `voiceover`, `audio_description` and `translation`. See [Attaching Scripts](/studio/endpoints/videos/attaching-scripts) for details. **backgroundWavArtifactId** `string` Artifact ID of the background audio (optional). **internationalMixWavArtifactId** `string` Artifact ID of the international mix audio (optional). **vocalsHitlWavArtifactId** `string` Artifact ID of the vocals HITL audio (optional). > [!NOTE] > > The background, international mix and vocals audio must have same duration as the source video. **remark** `string` Additional remarks about the video (optional). **stringVariables** `array` Optional array of key-value pairs for storing video metadata. Useful for storing external system references like backlinks, identifiers, or other custom metadata. Each item should be an object with `key` and `value` properties (both strings). Example: ```json theme={null} [ { "key": "storyTitleId", "value": "12345" }, { "key": "storyDeeplink", "value": "https://..." } ] ``` **pivotLanguage** `string` Optional pivot (intermediate) language code in [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) format (e.g., `en-US`). When set, translation goes through the pivot language first (e.g., `ru` → `en-US` → `es-ES`) instead of translating directly from source to each target language. This can improve translation quality for rare language pairs. Supported for `dubbing`, `voiceover`, `translation`, and `subtitling` workflow types. Not available for `transcription` and `audio_description`. When pivot language is used, original timings are automatically preserved (align step is skipped). **pipelineOptions** `object` Pipeline configuration options (all fields optional): * `shouldAutomateTranscription` (boolean): Automatically transcribe the source video; not available with `pivotLanguage` * `shouldAutomateTranslation` (boolean): Automatically translate the transcription * `shouldAutomateVoiceSelection` (boolean): Automatically select voices for speakers * `voiceSelectionMode` (string): How voices are selected during automation. Requires `shouldAutomateVoiceSelection: true`. One of: * `default` — use library voices (default) * `cloning` — use voice cloning (ElevenLabs). All target languages must support cloning * `emotion_transfer` — use emotion transfer. Must be enabled for your organization, and all target languages must support it * `label` — use only voices with a specific label. Requires `voiceSelectionVoicesLabel` * `voiceSelectionVoicesLabel` (string): Voice label name to filter by. Required when `voiceSelectionMode` is `label`. The label must exist; a speaker the label has no matching voice for keeps a library voice **referenceArchiveArtifactId** `string` **Voice lines only.** Artifact ID of a `references` archive — a zip of recordings (`.wav`, `.mp3`, `.m4a`, `.aac`, `.ogg`, `.flac`, or video files) matched to script lines by their `inputFileName` column. Required for `voiceSelectionMode` `cloning` and `emotion_transfer`. **subtitlingParams** `object` Subtitling parameters per destination language. Used only when `workflowType` is `subtitling`. This is an object where keys are language codes (e.g., 'en-US', 'es-ES') and values are objects with the following optional fields:
  • `maxLinesPerSubtitle` (number): Maximum number of lines per subtitle (default: 2, range: 1-5)
  • `maxCharsPerLine` (number): Maximum number of characters per line (CPL) (default: 30, range: 1-1000)
  • `maxCharsPerSecond` (number): Maximum reading speed in characters per second (CPS) (default: 20, range: 1-100)
  • `minDurationMs` (number): Minimum subtitle duration in milliseconds (default: 1000, range: 100-60000)
  • `maxDurationMs` (number): Maximum subtitle duration in milliseconds (default: 6000, range: 100-60000)
Example: ```json theme={null} { "en-US": { "maxLinesPerSubtitle": 2, "maxCharsPerLine": 30, "maxCharsPerSecond": 20, "minDurationMs": 1000, "maxDurationMs": 6000 }, "es-ES": { "maxLinesPerSubtitle": 2, "maxCharsPerLine": 35, "maxCharsPerSecond": 18, "minDurationMs": 1000, "maxDurationMs": 6000 } } ``` **translationPrompt** `object` Extra translation guidance passed to the translation engine. Optional.
  • `common` (string): Guidance applied to **all** target languages.
  • `byLang` (object): Per-language guidance. Keys are target language codes (each must be present in `targetLanguages`), values are strings. The backend merges `common` first, then the language-specific prompt.
Example: ```json theme={null} { "common": "Keep brand names in English and use a friendly tone.", "byLang": { "de-DE": "Use the formal register (Sie)." } } ``` **processingOptions** `object` Advanced audio processing and export options applied when the video is rendered. All fields are optional; omit the field entirely to use the defaults.
  • `exportTtsAaf` (boolean): Export the synthesized speech in AAF format with separate audio tracks for each speaker (default: `false`).
  • `channelPerSpeaker` (boolean, **deprecated**): Place each speaker in a separate audio channel instead of mixing them into one (default: `false`). Use `exportTtsAaf` instead.
  • `targetLoudness` (number): Final loudness (LUFS) the output is normalized to (default: `-23`, per the EBU R128 standard).
  • `ttsLoudness` (number): Loudness (LUFS) of the synthesized speech handed to mixing (default: `-23`).
  • `mixerCrossfadeMs` (number): Crossfade duration in milliseconds at speech boundaries — controls how smooth or sharp audio transitions are (default: `300`).
  • `exportWavCodec` (string): Audio codec for WAV export. One of `pcm_s16le`, `pcm_s24le`, `pcm_s32le`, `pcm_f32le`, `pcm_f64le` (default: `pcm_s16le`).
  • `exportWavRate` (number): Sample rate in Hz for exported WAV files, e.g. `44100`, `48000` (default: `44100`).
  • `voiceoverMuffleDb` (number): How much (dB) to lower the original audio where synthesis is overlaid in voiceover mode. Higher values make the original quieter (default: `9`).
  • `backgroundMuffleDb` (number): How much (dB) to lower the background track in voice-replacement mode. Applied only when a background track is provided (default: `7`).
  • `voiceoverFixVocalsVolume` (boolean): Lower the on-screen speech across the whole track (by `voiceoverMuffleDb`), not only where synthesis is applied (default: `false`).
  • `voiceoverFixBackgroundVolume` (boolean): Keep the background at full volume and lower only the original speech by `voiceoverMuffleDb` when overlaying synthesis (default: `true`).
  • `transferVoiceLoudness` (boolean): Transfer the loudness of the separated original speech onto the synthesized speech, segment by segment (default: `false`).
  • `useBackgroundNorm` (boolean): Normalize the loudness of the background track (default: `false`).
Example: ```json theme={null} { "exportTtsAaf": true, "targetLoudness": -23, "exportWavCodec": "pcm_s24le", "exportWavRate": 48000 } ``` > [!NOTE] > > If you automate transcription, you won't be able to edit the generated transcription in the future. The transcription phase will be skipped, and the result of the AI's work will be used. ```bash cURL (Dubbing) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "New Marketing Video", "workflowType": "dubbing", "sourceArtifactId": "artifact_1234567890", "sourceLanguage": "en", "targetLanguages": ["es-ES", "fr-FR"], "pipelineOptions": { "shouldAutomateTranscription": true, "shouldAutomateTranslation": true, "shouldAutomateVoiceSelection": false }, "remark": "Optional comment", "stringVariables": [ { "key": "storyTitleId", "value": "12345" }, { "key": "storyDeeplink", "value": "https://pyramid.dalet.euronews.tech?titleId=12345&kanbanViewId=7KV6cv" } ] }' ``` ```bash cURL (Dubbing with Voice Label) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "News Segment", "workflowType": "dubbing", "sourceArtifactId": "artifact_1234567890", "sourceLanguage": "en", "targetLanguages": ["es-ES", "fr-FR"], "pipelineOptions": { "shouldAutomateTranscription": true, "shouldAutomateTranslation": true, "shouldAutomateVoiceSelection": true, "voiceSelectionMode": "label", "voiceSelectionVoicesLabel": "News" } }' ``` ```bash cURL (Audio Description with Voice Label) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Documentary", "workflowType": "audio_description", "sourceArtifactId": "artifact_1234567890", "sourceLanguage": "en", "targetLanguages": ["es-ES", "fr-FR"], "pipelineOptions": { "voiceSelectionMode": "label", "voiceSelectionVoicesLabel": "Narrators" } }' ``` ```bash cURL (Dubbing with Pivot Language) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Video with Pivot Translation", "workflowType": "dubbing", "sourceArtifactId": "artifact_1234567890", "sourceLanguage": "ru", "targetLanguages": ["en-US", "es-ES", "fr-FR"], "pivotLanguage": "en-US", "pipelineOptions": { "shouldAutomateTranscription": false, "shouldAutomateTranslation": true, "shouldAutomateVoiceSelection": true } }' ``` ```bash cURL (Dubbing with Source & Target Scripts) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Video with Ready Scripts", "workflowType": "dubbing", "sourceArtifactId": "artifact_1234567890", "sourceLanguage": "en", "targetLanguages": ["es-ES", "fr-FR"], "sourceScript": { "artifactId": "artifact_source_vtt" }, "targetScripts": { "es-ES": { "artifactId": "artifact_es_vtt" }, "fr-FR": { "artifactId": "artifact_fr_xlsx", "columns": { "text": "Line", "startTime": "In", "endTime": "Out", "speakerName": "Character" }, "frameRate": 25 } } }' ``` ```bash cURL (Voice lines) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Autumn promo — DE", "workflowType": "tts", "sourceLanguage": "de-DE", "targetLanguages": ["de-DE"], "sourceScript": { "artifactId": "artifact_script_xlsx", "columns": { "text": "Line", "speakerName": "Character", "outputFileName": "File name", "inputFileName": "Reference", "speechPrompt": "Direction" } }, "referenceArchiveArtifactId": "artifact_references_zip", "pipelineOptions": { "shouldAutomateVoiceSelection": true, "voiceSelectionMode": "cloning" } }' ``` ```bash cURL (Subtitling) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Video with Subtitles", "workflowType": "subtitling", "sourceArtifactId": "artifact_1234567890", "sourceLanguage": "en", "targetLanguages": ["es-ES", "fr-FR"], "subtitlingParams": { "es-ES": { "maxLinesPerSubtitle": 2, "maxCharsPerLine": 35, "maxCharsPerSecond": 18, "minDurationMs": 1000, "maxDurationMs": 6000 }, "fr-FR": { "maxLinesPerSubtitle": 2, "maxCharsPerLine": 30, "maxCharsPerSecond": 20, "minDurationMs": 1000, "maxDurationMs": 6000 } } }' ``` ```bash cURL (Advanced Processing Options) theme={null} curl -X POST \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/create \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Video with Custom Mixing", "workflowType": "dubbing", "sourceArtifactId": "artifact_1234567890", "sourceLanguage": "en", "targetLanguages": ["es-ES", "fr-FR"], "processingOptions": { "exportTtsAaf": true, "targetLoudness": -23, "exportWavCodec": "pcm_s24le", "exportWavRate": 48000, "voiceoverMuffleDb": 9 } }' ``` ```typescript TypeScript (Dubbing) theme={null} import axios from 'axios'; const response = await axios.post( 'https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/create', { name: 'New Marketing Video', workflowType: 'dubbing', sourceArtifactId: 'artifact_1234567890', sourceLanguage: 'en', targetLanguages: ['es-ES', 'fr-FR'], pipelineOptions: { shouldAutomateTranscription: true, shouldAutomateTranslation: true, shouldAutomateVoiceSelection: false }, remark: 'Optional comment', stringVariables: [ { key: "storyTitleId", value: "12345" }, { key: "storyDeeplink", value: "https://pyramid.dalet.euronews.tech?titleId=12345&kanbanViewId=7KV6cv" } ] }, { headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } } ); console.log(response.data); ``` ```typescript TypeScript (Subtitling) theme={null} import axios from 'axios'; const response = await axios.post( 'https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/create', { name: 'Video with Subtitles', workflowType: 'subtitling', sourceArtifactId: 'artifact_1234567890', sourceLanguage: 'en', targetLanguages: ['es-ES', 'fr-FR'], subtitlingParams: { 'es-ES': { maxLinesPerSubtitle: 2, maxCharsPerLine: 35, maxCharsPerSecond: 18, minDurationMs: 1000, maxDurationMs: 6000 }, 'fr-FR': { maxLinesPerSubtitle: 2, maxCharsPerLine: 30, maxCharsPerSecond: 20, minDurationMs: 1000, maxDurationMs: 6000 } } }, { headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } } ); console.log(response.data); ``` ## Response **id** `string` Unique identifier of the created video. **videoUrl** `string` URL to the created video resource. **name** `string` Name of the video. **status** `string` Status of the video (e.g., 'new'). **workflowType** `string` Type of the video processing (e.g., 'dubbing'). **srcLang** `string` Source language code. **dstLangs** `array` Array of target language codes. **pivotLanguage** `string | null` Pivot language code, if set. **videoDuration** `number` Duration of the video in seconds (if available). **remark** `string` Additional remarks about the video (if any). **stringVariables** `array | null` Array of key-value pairs containing video metadata, if provided. **translationPrompt** `object | null` The translation guidance stored for the video (`common` and/or `byLang`), or `null` if not set. **createdAt** `string` ISO timestamp of creation. **updatedAt** `string` ISO timestamp of last update. ```json Response theme={null} { "id": "vid_7a92c36d4fe3c", "videoUrl": "https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/vid_7a92c36d4fe3c", "name": "New Marketing Video", "status": "new", "workflowType": "dubbing", "srcLang": "en", "dstLangs": ["es-ES", "fr-FR"], "pivotLanguage": null, "videoDuration": 123.45, "remark": "Optional comment", "stringVariables": [ { "key": "storyTitleId", "value": "12345" }, { "key": "storyDeeplink", "value": "https://pyramid.dalet.euronews.tech?titleId=12345&kanbanViewId=7KV6cv" } ], "createdAt": "2024-06-30T12:00:00.000Z", "updatedAt": "2024-06-30T12:00:00.000Z" } ``` ```json Error Response theme={null} { "error": "Bad Request" } ``` ```json 429 Response theme={null} { "error": "Video creation limit reached: 100 videos per hour. Try again in 12 min.", "resource": "videos", "window": "1h", "limit": 100, "retryAfterSeconds": 720 } ``` > [!NOTE] > > Video creation is rate limited per organization. Over the limit the endpoint returns `429` with a `Retry-After` header. See [Rate Limiting](/studio/authentication#rate-limiting). ## Audio description An `audio_description` video is voiced by a single narrator. The narrator voice is always selected automatically: there is no voice selection task to assign. Compared to the other workflows: | Field | Audio description | | - | - | | `pipelineOptions.voiceSelectionMode` | `default` (a library voice) or `label`. `cloning`, `emotion_transfer`, `ai_selection` and `ai_design` are rejected with `400`: the narrator has no recording in the source video to take a voice from | | `pipelineOptions.voiceSelectionVoicesLabel` | With `label`, the narrator gets a voice of the label for the target language, whatever its gender. To get one exact voice, use a label that holds only that voice. If the label has no voice for a language, the narrator of that language gets a library voice | | `pipelineOptions.shouldAutomateVoiceSelection` | Not required for `label` | | `shouldAutomateTranscription`, `shouldAutomateTranslation`, `shouldAutomateVoiceSelection` | Have no effect | ## Voice lines A `tts` video takes a script instead of a video and delivers one audio file per line (or per `outputFileName` group), packed as `tts.zip`. Compared to the other workflows: | Field | Voice lines | | - | - | | `sourceArtifactId` | Must be omitted | | `sourceScript` | **Required.** The script to voice — see [Attaching Scripts](/studio/endpoints/videos/attaching-scripts) for the Voice lines columns (`outputFileName`, `inputFileName`, `speechPrompt`, …). Only the `fromFile` timings and speakers modes are accepted; `shiftMs`, `frameRate` and `constantSpeakerId` are not | | `sourceLanguage` / `targetLanguages` | The script's language, given as both: `targetLanguages` must contain exactly one language equal to `sourceLanguage` | | `referenceArchiveArtifactId` | Optional recordings for the reference-based voice modes | | `pipelineOptions.voiceSelectionMode` | `default`, `label`, `cloning`, `emotion_transfer`; `cloning` and `emotion_transfer` need `referenceArchiveArtifactId` | | `targetScripts`, `pivotLanguage`, `subtitlingParams`, `translationPrompt`, `sourceLanguageWhitelist`, `shouldAutomateTranscription`, `shouldAutomateTranslation`, the background / mix / vocals artifacts | Rejected with `400` | Credits are charged by the number of characters in the script at creation. Voices are selected and the script is rendered automatically; poll [Get Project Video Status](/studio/endpoints/videos/get-project-video-status) until the `rendering` phase rests on `editor`, then fetch `tts.zip` from [List Translation Export Files](/studio/endpoints/videos/list-translation-export-files) for the video's language. > [!NOTE] > > The Voice lines workflow must be enabled for your organization. Contact your account manager to activate it. # Delete Project Video Source: https://docs.dubformer.ai/studio/endpoints/videos/delete-project-video DELETE /api/projects/{projectId}/videos/{videoId} Delete a video from a project This endpoint allows you to delete a video from a project. The video will be marked as deleted and become unavailable. ## Path Parameters **projectId** `string` *required* The unique identifier of the project. **videoId** `string` *required* The unique identifier of the video to delete. ## Response **deleted** `boolean` *required* Will be true if the video was deleted successfully. ```bash cURL theme={null} curl -X DELETE \ https://studio.dubformer.ai/api/projects/PROJECT_ID/videos/VIDEO_ID \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.delete( 'https://studio.dubformer.ai/api/projects/PROJECT_ID/videos/VIDEO_ID', { headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } } ); console.log(response.data); // { deleted: true } ``` ```json Response theme={null} { "deleted": true } ``` ```json Error Response theme={null} { "error": "Not Found" } ``` ## Notes * The video must exist and belong to a project that you have access to * The video will be marked as deleted and become unavailable * This operation is irreversible # Get Project Video Source: https://docs.dubformer.ai/studio/endpoints/videos/get-project-video GET /api/v1/projects/{projectId}/videos/{videoId} Retrieve details of a specific video in a project This endpoint returns detailed information about a specific video within a project. ## Path Parameters **projectId** `string` *required* The unique identifier of the project. **videoId** `string` *required* The unique identifier of the video. ## Response The response is a JSON object with the following fields: **id** `string` Unique video identifier. **name** `string` Name of the video. **status** `string` Current status of the video (e.g., 'new', 'in\_progress', 'completed'). **processingType** `string` Type of video processing (e.g., `dubbing`, `voiceover`, `audio_description`, `transcription`, `translation`, `subtitling`). **srcLang** `string` Source language code. **dstLangs** `array` Array of target language codes. **videoUrl** `string` URL to the video resource. **videoDuration** `number` Duration of the video in seconds (if available). **remark** `string` Additional remarks about the video (if any). **stringVariables** `array | null` Array of key-value pairs containing video metadata, if provided. **createdAt** `string` ISO timestamp of creation. **updatedAt** `string` ISO timestamp of last update. ```bash cURL theme={null} curl -X GET \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/vid_7a92c36d4fe3c \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.get( 'https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/vid_7a92c36d4fe3c', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); console.log(response.data); ``` ```json Response theme={null} { "id": "vid_7a92c36d4fe3c", "name": "Marketing Video 1", "status": "completed", "processingType": "dubbing", "srcLang": "en", "dstLangs": ["es-ES", "fr-FR"], "videoUrl": "https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/vid_7a92c36d4fe3c", "videoDuration": 123.45, "remark": "Some remark", "stringVariables": [ { "key": "storyTitleId", "value": "12345" }, { "key": "storyItemCode", "value": "PYR_3345" } ], "createdAt": "2023-12-01T10:30:00.000Z", "updatedAt": "2023-12-01T15:45:00.000Z" } ``` ```json Error Response theme={null} { "error": "Not Found" } ``` # Get Project Video Status Source: https://docs.dubformer.ai/studio/endpoints/videos/get-project-video-status GET /api/v1/projects/{projectId}/videos/{videoId}/status Track pipeline status of a video, per target language This endpoint reports the processing status of a video, broken down **per target language**. For each language you get the current stage, whether it is being processed automatically or worked on manually, whether anything failed, and a rough completion estimate. Each video produces one entry per target language. All target languages are present from the start. Transcription-only videos return a single entry keyed by the source language. ## Path Parameters **projectId** `string` *required* The unique identifier of the project. **videoId** `string` *required* The unique identifier of the video. ## Response **langs** `object[]` One entry per target language. **language** **lang** `string` Language of this entry (source language for `transcription`-type videos). **phase** `string` How far the pipeline has progressed. One of: `transcription` (transcribing the source audio), `translation` (translating into the target language), `voiceover` (generating and refining the synthesized voice), `mixing` (mixing the voice with the original background audio), `rendering` (producing the final video file). **pendingOn** `string | null` Whose side the ball is on right now. `system` — automated processing is running or queued. `editor` — our team is working on it manually, or the stage is ready and awaiting further manual input. `null` — this language is stuck on an error (see `isError`). **isError** `boolean` `true` if the latest processing step failed. Clears automatically once a retry starts. **eta** `string | null` Approximate ISO-8601 completion time of the step currently running. `null` while a step is queued or while a manual step is in progress. > [!NOTE] > > `eta` is an **approximate** estimate for the **current running step only** — not the whole remaining > pipeline. There is no terminal "done" state: once finished, an entry rests at `pendingOn: "editor"` > (edits are always possible). Use the export endpoints to fetch produced files. > [!NOTE] > > A Voice lines (`tts`) video has no transcription, translation or mixing. It reports `voiceover` while the > script is uploaded and its voices are selected, then `rendering` while the lines are synthesized. A > finished render rests at `pendingOn: "editor"`; a render that failed for some or all lines sets `isError`. ```bash cURL theme={null} curl -X GET \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/vid_7a92c36d4fe3c/status \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.get( 'https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/vid_7a92c36d4fe3c/status', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); console.log(response.data); ``` ```json Response theme={null} { "langs": [ { "lang": "es-ES", "phase": "voiceover", "pendingOn": "editor", "isError": false, "eta": null }, { "lang": "fr-FR", "phase": "translation", "pendingOn": "system", "isError": false, "eta": "2026-07-17T12:20:00.000Z" } ] } ``` ```json Error Response theme={null} { "error": "Video not found" } ``` # List Export Files Source: https://docs.dubformer.ai/studio/endpoints/videos/list-export-files GET /api/v1/projects/{projectId}/videos/{videoId}/export List the downloadable source files of a video with temporary download links This endpoint returns the downloadable source-level files of a video (original video, music & effects, international mix, vocals, original script), each with a temporary presigned download link. Only files that are currently available are returned. Files that are still being produced are omitted, so you can poll this endpoint until the file you need appears in the response. The original script is the most complete transcript available: `asr_aligned.vtt` once the transcription is reviewed and aligned, otherwise the edited transcript (`asr_hitl.vtt`) or the automated one (`asr_auto.vtt`). Check `filename` to tell them apart. ## Path Parameters **projectId** `string` *required* The unique identifier of the project. **videoId** `string` *required* The unique identifier of the video. ## Response The response is a JSON array of file objects. Each object has the following fields: **presignedUrl** `string` Temporary presigned URL to download the file directly from storage. Valid for 24 hours (see `expiresAt`). **filename** `string` Name of the file, including its extension (e.g. `original.mp4`, `asr_aligned.vtt`). **modifiedAt** `string` ISO timestamp of when the file was last modified. **expiresAt** `string` ISO timestamp of when `presignedUrl` expires. ```bash cURL theme={null} curl -X GET \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/vid_7a92c36d4fe3c/export \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.get( 'https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/vid_7a92c36d4fe3c/export', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); console.log(response.data); ``` ```json Response theme={null} [ { "presignedUrl": "https://df-studio-storage.s3.eu-west-1.amazonaws.com/.../original.mp4?X-Amz-Signature=...", "filename": "original.mp4", "modifiedAt": "2026-07-14T09:12:03.000Z", "expiresAt": "2026-07-15T09:12:03.000Z" }, { "presignedUrl": "https://df-studio-storage.s3.eu-west-1.amazonaws.com/.../asr_aligned.vtt?X-Amz-Signature=...", "filename": "asr_aligned.vtt", "modifiedAt": "2026-07-14T09:12:03.000Z", "expiresAt": "2026-07-15T09:12:03.000Z" } ] ``` ```json Error Response theme={null} { "error": "Not Found" } ``` # List Project Videos Source: https://docs.dubformer.ai/studio/endpoints/videos/list-project-videos GET /api/v1/projects/{projectId}/videos Retrieve a list of all videos associated with a specific project This endpoint returns a list of all videos that were added to the specified project. ## Path Parameters **projectId** `string` *required* The unique identifier of the project. ## Response The response is a JSON array of video objects. Each object has the following fields: **id** `string` Unique video identifier. **name** `string` Name of the video. **status** `string` Current status of the video (e.g., `new`, `in_progress`, `completed`). **processingType** `string` Type of video processing (e.g., `dubbing`, `voiceover`, `audio_description`, `transcription`, `translation`, `subtitling`). **srcLang** `string` Source language code. **dstLangs** `array` Array of target language codes. **videoUrl** `string` URL to the video resource. **videoDuration** `number` Duration of the video in seconds (if available). **remark** `string` Additional remarks about the video (if any). **stringVariables** `array | null` Array of key-value pairs containing video metadata, if provided. **createdAt** `string` ISO timestamp of creation. **updatedAt** `string` ISO timestamp of last update. ```bash cURL theme={null} curl -X GET \ https://studio.dubformer.ai/api/v1/projects/5f83a14b2ec1b8a1234567890/videos \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.get( 'https://studio.dubformer.ai/api/v1/projects/5f83a14b2ec1b8a1234567890/videos', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); console.log(response.data); ``` ```json Response theme={null} [ { "id": "7a92c36d4fe3c8b1234567891", "name": "marketing_video_1.mp4", "status": "completed", "processingType": "dubbing", "srcLang": "en", "dstLangs": ["es-ES", "fr-FR"], "videoUrl": "https://studio.dubformer.ai/api/v1/projects/5f83a14b2ec1b8a1234567890/videos/7a92c36d4fe3c8b1234567891", "videoDuration": 123.45, "remark": "Some remark", "stringVariables": [ { "key": "storyTitleId", "value": "12345" } ], "createdAt": "2023-12-01T10:30:00.000Z", "updatedAt": "2023-12-01T15:45:00.000Z" }, { "id": "8b03d47e5gf4d9c1234567892", "name": "training_video_2.mp4", "status": "in_progress", "processingType": "voiceover", "srcLang": "en", "dstLangs": ["es-ES"], "videoUrl": "https://studio.dubformer.ai/api/v1/projects/5f83a14b2ec1b8a1234567890/videos/8b03d47e5gf4d9c1234567892", "videoDuration": 98.7, "remark": null, "stringVariables": null, "createdAt": "2023-12-01T11:00:00.000Z", "updatedAt": "2023-12-01T14:20:00.000Z" } ] ``` ```json Error Response theme={null} { "error": "Not Found" } ``` # List Translation Export Files Source: https://docs.dubformer.ai/studio/endpoints/videos/list-translation-export-files GET /api/v1/projects/{projectId}/videos/{videoId}/translations/{locale}/export List the downloadable files of a translation with temporary download links This endpoint returns the downloadable files of a single target language (final video, mixed audio, synthesis-only audio, adapted script, subtitles, cast), each with a temporary presigned download link. Only files that are currently available are returned. Files that are still being produced are omitted, so you can poll this endpoint until the file you need appears in the response. ## Path Parameters **projectId** `string` *required* The unique identifier of the project. **videoId** `string` *required* The unique identifier of the video. **locale** `string` *required* The target language code, matching one of the video's `dstLangs` (e.g. `en-GB`). Case-insensitive. ## Response The response is a JSON array of file objects. Each object has the following fields: **presignedUrl** `string` Temporary presigned URL to download the file directly from storage. Valid for 24 hours (see `expiresAt`). **filename** `string` Name of the file, including its extension (e.g. `tts_final.mp4`, `subs_hitl.vtt`). **modifiedAt** `string` ISO timestamp of when the file was last modified. **expiresAt** `string` ISO timestamp of when `presignedUrl` expires. > [!NOTE] > > The synthesis-only audio `tts.wav` may be a single multichannel file with one channel per > speaker. Channels are ordered by speaker id sorted as strings (e.g. `F0`, `M0`, `M1`). To map a > channel to a speaker, collect the distinct speaker ids from the adapted script (`tts_hitl.vtt` / > `tts_auto.vtt`) and sort them the same way — the channel index is the speaker's position in that > sorted list. ```bash cURL theme={null} curl -X GET \ https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/vid_7a92c36d4fe3c/translations/en-GB/export \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.get( 'https://studio.dubformer.ai/api/v1/projects/proj_5f83a14b2ec1b/videos/vid_7a92c36d4fe3c/translations/en-GB/export', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); console.log(response.data); ``` ```json Response theme={null} [ { "presignedUrl": "https://df-studio-storage.s3.eu-west-1.amazonaws.com/.../en-GB/tts_final.mp4?X-Amz-Signature=...", "filename": "tts_final.mp4", "modifiedAt": "2026-07-14T09:12:03.000Z", "expiresAt": "2026-07-15T09:12:03.000Z" }, { "presignedUrl": "https://df-studio-storage.s3.eu-west-1.amazonaws.com/.../en-GB/tts.wav?X-Amz-Signature=...", "filename": "tts.wav", "modifiedAt": "2026-07-14T09:12:03.000Z", "expiresAt": "2026-07-15T09:12:03.000Z" }, { "presignedUrl": "https://df-studio-storage.s3.eu-west-1.amazonaws.com/.../en-GB/subs_hitl.vtt?X-Amz-Signature=...", "filename": "subs_hitl.vtt", "modifiedAt": "2026-07-14T09:12:03.000Z", "expiresAt": "2026-07-15T09:12:03.000Z" } ] ``` ```json Error Response theme={null} { "error": "Unknown translation locale 'xx-XX'" } ``` # Update Project Video Source: https://docs.dubformer.ai/studio/endpoints/videos/update-project-video PATCH /api/projects/{projectId}/videos/{videoId} Update a video in a project This endpoint allows you to update various properties of a video in a project: name, translation languages, processing type, status, and remark. ## Path Parameters **projectId** `string` *required* The unique identifier of the project. **videoId** `string` *required* The unique identifier of the video to update. ## Request Body **name** `string` New name for the video. **dstLangs** `string[]` New translation languages for the video. **processingType** `string` New processing type for the video. **status** `string` New status for the video. **remark** `string` New remark for the video. **stringVariables** `array` Array of key-value pairs for storing video metadata. Useful for storing external system references like backlinks, identifiers, or other custom metadata. Replaces the entire array when provided. Each item should be an object with `key` and `value` properties (both strings). Example: ```json theme={null} [ { "key": "storyTitleId", "value": "12345" }, { "key": "storyDeeplink", "value": "https://..." } ] ``` **translationPrompt** `object` Extra translation guidance passed to the translation engine. Replaces the stored value when provided.
  • `common` (string): Guidance applied to **all** target languages.
  • `byLang` (object): Per-language guidance, keyed by target language code. Each key must be one of the video's target languages (the `dstLangs` sent in the same request, or the video's existing ones).
Example: ```json theme={null} { "common": "Keep brand names in English and use a friendly tone.", "byLang": { "de-DE": "Use the formal register (Sie)." } } ``` ```bash cURL theme={null} curl -X PATCH \ https://studio.dubformer.ai/api/projects/PROJECT_ID/videos/VIDEO_ID \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "New video name", "dstLangs": ["en", "fr"], "processingType": "standard", "status": "in_progress", "remark": "Updated video description" }' ``` ```typescript TypeScript theme={null} import axios from 'axios'; const response = await axios.patch( 'https://studio.dubformer.ai/api/projects/PROJECT_ID/videos/VIDEO_ID', { name: 'New video name', dstLangs: ['en', 'fr'], processingType: 'standard', status: 'in_progress', remark: 'Updated video description' }, { headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } } ); console.log(response.data); // updated video object ``` ## Response **id** `string` *required* The unique identifier of the video. **name** `string` *required* The name of the video. **status** `string` *required* The status of the video. **processingType** `string` *required* The processing type of the video. **srcLang** `string` *required* The source language of the video. **dstLangs** `string[]` *required* The translation languages of the video. **videoUrl** `string` *required* The URL of the video file. **remark** `string` The remark for the video. **stringVariables** `array | null` Array of key-value pairs with video metadata, or null if not set. **translationPrompt** `object | null` The translation guidance stored for the video (`common` and/or `byLang`), or `null` if not set. **createdAt** `string` *required* Creation timestamp. **updatedAt** `string` *required* Last update timestamp. ```json Response theme={null} { "id": "vid_7a92c36d4fe3c", "name": "New video name", "status": "in_progress", "processingType": "standard", "srcLang": "ru", "dstLangs": ["en", "fr"], "videoUrl": "https://...", "remark": "Updated video description", "createdAt": "2024-06-01T12:00:00.000Z", "updatedAt": "2024-06-01T12:34:56.000Z" } ``` ```json Error Response theme={null} { "error": "No valid fields to update" } ``` ## Notes * You can update one or several fields in a single request * The video must exist and belong to a project that you have access to * The response format matches the get-project-video endpoint