Prerequisites
- A DeepL API key with Voice Translate Job API access
curlfor the API calls in this guide- An audio file to translate (MP3, WAV, or another supported format)
https://api.deepl.com. API Free users should replace this with https://api-free.deepl.com.
Step 1: Create the job
Send a POST request to/v1/jobs/voice/translate with three pieces of information:
- The source file’s name, size in bytes, and content type
- The source language
- One or more translation targets, each specifying a language and output type
content_length must be the exact byte size of the file you will upload in the next step.
A successful response returns HTTP 201 with a job_id, a one-time upload_url, and a signature:
job_id — you need it to check status and retrieve results.
Step 2: Upload the source file
PUT the audio file directly to theupload_url from the previous response. You must complete the upload within 5 minutes of creating the job.
Content-Type header must match the content_type you declared when creating the job.
Step 3: Poll for status
Check the job status by sending a GET request to/v1/jobs/voice/translate/{job_id}. The API processes each target independently, so results may become available at different times.
download_url and signature:
status can be pending, uploaded, processing, complete, downloaded, or failed. See the status lifecycle for how these progress. A failed status on one target does not affect the others.
Step 4: Download the results
For each result with"status": "complete", download the output from its download_url. No authentication header is required — the URL is pre-authorized.
404.
Putting it together
Here is the complete flow as a Python script. It creates the job, uploads the file, polls until all results are complete or failed, then downloads each completed result.translate_audio.py
Common issues
400 on job creation: Thecontent_length must exactly match the file you will upload. Read the file size before sending the create request, don’t estimate it.
Upload times out: The upload window is 5 minutes from job creation. If your file is large or your connection is slow, start the upload immediately after creating the job.
Results expire before download: Download results within 1 hour of uploading the source file. If your polling loop is slow, check updated_at in the status response to estimate how much time remains.
One target fails, others succeed: Failures are per-target. Check the error.message field on failed results and download the successful ones independently.
For format support, per-language availability, and job limits, see the Translate Audio Files reference.