curl --request POST \
--url https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"taskId": "2047316590123456789",
"targetLanguage": "en-US"
}
'import requests
url = "https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate"
payload = {
"taskId": "2047316590123456789",
"targetLanguage": "en-US"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({taskId: '2047316590123456789', targetLanguage: 'en-US'})
};
fetch('https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate', 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.vmeg.ai/openapi/v1/app/tasks/transcription/translate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'taskId' => '2047316590123456789',
'targetLanguage' => 'en-US'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Idempotency-Key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate"
payload := strings.NewReader("{\n \"taskId\": \"2047316590123456789\",\n \"targetLanguage\": \"en-US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate")
.header("X-Idempotency-Key", "<x-idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"taskId\": \"2047316590123456789\",\n \"targetLanguage\": \"en-US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Idempotency-Key"] = '<x-idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"taskId\": \"2047316590123456789\",\n \"targetLanguage\": \"en-US\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "",
"data": {
"taskId": "<string>",
"translation": {
"status": "running",
"targetLanguage": "en-US"
}
}
}Translate transcript
Translate the whole transcript of a finished transcription job into targetLanguage, using the same translation as the Translate button in the website transcription editor. Use it for mixed-language recordings too: create the job with several language.source codes, then translate the full conversation into English.
Translation runs asynchronously. Poll Query job status: result.translation.status goes from running to finished. Then download it with Download transcript and content=translation. The original transcript is unchanged and still available with content=source.
- One target language per job, as on the website. Requesting a different language for a job that already has a translation returns
409. Requesting the same language again re-translates the whole transcript and replaces the previous translation, including edits made on the website. - Requires the same credit balance check as the website; an insufficient balance returns
402. - Requires
X-Idempotency-Key.
Errors use the JSON envelope with HTTP 200 and code in the body: 400 invalid parameters; 402 insufficient credits; 404 not a transcription job in your account; 409 the job is not finished, a translation is already running, the job already has a different target language or the transcript is being updated (retry later).
curl --request POST \
--url https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"taskId": "2047316590123456789",
"targetLanguage": "en-US"
}
'import requests
url = "https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate"
payload = {
"taskId": "2047316590123456789",
"targetLanguage": "en-US"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({taskId: '2047316590123456789', targetLanguage: 'en-US'})
};
fetch('https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate', 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.vmeg.ai/openapi/v1/app/tasks/transcription/translate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'taskId' => '2047316590123456789',
'targetLanguage' => 'en-US'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Idempotency-Key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate"
payload := strings.NewReader("{\n \"taskId\": \"2047316590123456789\",\n \"targetLanguage\": \"en-US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate")
.header("X-Idempotency-Key", "<x-idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"taskId\": \"2047316590123456789\",\n \"targetLanguage\": \"en-US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vmeg.ai/openapi/v1/app/tasks/transcription/translate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Idempotency-Key"] = '<x-idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"taskId\": \"2047316590123456789\",\n \"targetLanguage\": \"en-US\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "",
"data": {
"taskId": "<string>",
"translation": {
"status": "running",
"targetLanguage": "en-US"
}
}
}Authorizations
Send your API Key in the Authorization header (Bearer <api_key>). See Authentication.
Headers
Required on mutating POST requests that create tasks or change persisted data (max 64 characters). See Idempotency.
64Body
ID of a finished transcription job
Target language code, e.g. en-US. One language only; auto and comma-separated lists return 400. See Supported languages.
"en-US"

