Create Translation
POST
/
v1
/
audio
/
translations
Typescript
const client = new Dedalus();
const result = await client.audio.translations.create({ ...params });client = Dedalus()
result = client.audio.translations.create(**params)client := dedalus.NewClient()
result, err := client.Audio.Translations.New(ctx, body githubcomdedaluslabsdedalussdkgo.AudioTranslationNewParams)curl --request POST \
--url https://api.dedaluslabs.ai/v1/audio/translations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'model=<string>' \
--form 'prompt=<string>' \
--form 'response_format=<string>' \
--form temperature=123const form = new FormData();
form.append('file', '<string>');
form.append('model', '<string>');
form.append('prompt', '<string>');
form.append('response_format', '<string>');
form.append('temperature', '123');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.dedaluslabs.ai/v1/audio/translations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dedaluslabs.ai/v1/audio/translations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"response_format\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"temperature\"\r\n\r\n123\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.dedaluslabs.ai/v1/audio/translations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"response_format\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"temperature\"\r\n\r\n123\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dedaluslabs.ai/v1/audio/translations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"response_format\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"temperature\"\r\n\r\n123\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"language": "<string>",
"duration": 123,
"text": "<string>",
"segments": [
{
"id": 123,
"seek": 123,
"start": 123,
"end": 123,
"text": "<string>",
"tokens": [
123
],
"temperature": 123,
"avg_logprob": 123,
"compression_ratio": 123,
"no_speech_prob": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Overview
Translate audio files from any supported language to English text. Useful for international content localization and multilingual transcription. Note: OpenAI only endpoint.Usage Examples
curl -X POST https://api.dedaluslabs.ai/v1/audio/translations \
-H "Authorization: Bearer YOUR_API_KEY" \
-F file="@audio.mp3" \
-F model="openai/whisper-1"
from dedalus_labs import Dedalus
client = Dedalus(api_key="YOUR_API_KEY")
audio_file = open("audio.mp3", "rb")
translation = client.audio.translations.create(
model="openai/whisper-1",
file=audio_file,
)
print(translation.text)
import { Dedalus } from "dedalus-labs";
import fs from "fs";
const client = new Dedalus({
apiKey: "YOUR_API_KEY",
});
const translation = await client.audio.translations.create({
file: fs.createReadStream("audio.mp3"),
model: "openai/whisper-1",
});
console.log(translation.text);
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
multipart/form-data
Response
Successful Response
- CreateTranslationResponseVerboseJson
- CreateTranslationResponseJson
Fields: # noqa: D415.
- language (required): str
- duration (required): float
- text (required): str
- segments (optional): list[TranscriptionSegment]
Last modified on March 10, 2026
Was this page helpful?
⌘I
Typescript
const client = new Dedalus();
const result = await client.audio.translations.create({ ...params });client = Dedalus()
result = client.audio.translations.create(**params)client := dedalus.NewClient()
result, err := client.Audio.Translations.New(ctx, body githubcomdedaluslabsdedalussdkgo.AudioTranslationNewParams)curl --request POST \
--url https://api.dedaluslabs.ai/v1/audio/translations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'model=<string>' \
--form 'prompt=<string>' \
--form 'response_format=<string>' \
--form temperature=123const form = new FormData();
form.append('file', '<string>');
form.append('model', '<string>');
form.append('prompt', '<string>');
form.append('response_format', '<string>');
form.append('temperature', '123');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.dedaluslabs.ai/v1/audio/translations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dedaluslabs.ai/v1/audio/translations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"response_format\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"temperature\"\r\n\r\n123\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.dedaluslabs.ai/v1/audio/translations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"response_format\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"temperature\"\r\n\r\n123\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dedaluslabs.ai/v1/audio/translations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"response_format\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"temperature\"\r\n\r\n123\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"language": "<string>",
"duration": 123,
"text": "<string>",
"segments": [
{
"id": 123,
"seek": 123,
"start": 123,
"end": 123,
"text": "<string>",
"tokens": [
123
],
"temperature": 123,
"avg_logprob": 123,
"compression_ratio": 123,
"no_speech_prob": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}