curl --request POST \
--url https://openapi.akool.com/api/open/v3/content/video/createbytranslate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4",
"language": "ja,zh-CN-shandong,zh-CN-sichuan",
"source_language": "en",
"lipsync": false,
"speaker_num": 1,
"webhookUrl": "",
"remove_bgm": true,
"caption_type": 2,
"caption_url": "https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt",
"studio_voice": {
"no_translate_words": [
"kaka",
"lal"
],
"fixed_words": {
"hi": "hello",
"bad": "good"
},
"pronounced_words": {
"lel": "lele",
"gga": "gaga"
},
"style": "professional"
},
"dynamic_duration": false
}
'import requests
url = "https://openapi.akool.com/api/open/v3/content/video/createbytranslate"
payload = {
"url": "https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4",
"language": "ja,zh-CN-shandong,zh-CN-sichuan",
"source_language": "en",
"lipsync": False,
"speaker_num": 1,
"webhookUrl": "",
"remove_bgm": True,
"caption_type": 2,
"caption_url": "https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt",
"studio_voice": {
"no_translate_words": ["kaka", "lal"],
"fixed_words": {
"hi": "hello",
"bad": "good"
},
"pronounced_words": {
"lel": "lele",
"gga": "gaga"
},
"style": "professional"
},
"dynamic_duration": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4',
language: 'ja,zh-CN-shandong,zh-CN-sichuan',
source_language: 'en',
lipsync: false,
speaker_num: 1,
webhookUrl: '',
remove_bgm: true,
caption_type: 2,
caption_url: 'https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt',
studio_voice: {
no_translate_words: ['kaka', 'lal'],
fixed_words: {hi: 'hello', bad: 'good'},
pronounced_words: {lel: 'lele', gga: 'gaga'},
style: 'professional'
},
dynamic_duration: false
})
};
fetch('https://openapi.akool.com/api/open/v3/content/video/createbytranslate', 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://openapi.akool.com/api/open/v3/content/video/createbytranslate",
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([
'url' => 'https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4',
'language' => 'ja,zh-CN-shandong,zh-CN-sichuan',
'source_language' => 'en',
'lipsync' => false,
'speaker_num' => 1,
'webhookUrl' => '',
'remove_bgm' => true,
'caption_type' => 2,
'caption_url' => 'https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt',
'studio_voice' => [
'no_translate_words' => [
'kaka',
'lal'
],
'fixed_words' => [
'hi' => 'hello',
'bad' => 'good'
],
'pronounced_words' => [
'lel' => 'lele',
'gga' => 'gaga'
],
'style' => 'professional'
],
'dynamic_duration' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-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://openapi.akool.com/api/open/v3/content/video/createbytranslate"
payload := strings.NewReader("{\n \"url\": \"https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4\",\n \"language\": \"ja,zh-CN-shandong,zh-CN-sichuan\",\n \"source_language\": \"en\",\n \"lipsync\": false,\n \"speaker_num\": 1,\n \"webhookUrl\": \"\",\n \"remove_bgm\": true,\n \"caption_type\": 2,\n \"caption_url\": \"https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt\",\n \"studio_voice\": {\n \"no_translate_words\": [\n \"kaka\",\n \"lal\"\n ],\n \"fixed_words\": {\n \"hi\": \"hello\",\n \"bad\": \"good\"\n },\n \"pronounced_words\": {\n \"lel\": \"lele\",\n \"gga\": \"gaga\"\n },\n \"style\": \"professional\"\n },\n \"dynamic_duration\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://openapi.akool.com/api/open/v3/content/video/createbytranslate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4\",\n \"language\": \"ja,zh-CN-shandong,zh-CN-sichuan\",\n \"source_language\": \"en\",\n \"lipsync\": false,\n \"speaker_num\": 1,\n \"webhookUrl\": \"\",\n \"remove_bgm\": true,\n \"caption_type\": 2,\n \"caption_url\": \"https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt\",\n \"studio_voice\": {\n \"no_translate_words\": [\n \"kaka\",\n \"lal\"\n ],\n \"fixed_words\": {\n \"hi\": \"hello\",\n \"bad\": \"good\"\n },\n \"pronounced_words\": {\n \"lel\": \"lele\",\n \"gga\": \"gaga\"\n },\n \"style\": \"professional\"\n },\n \"dynamic_duration\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.akool.com/api/open/v3/content/video/createbytranslate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4\",\n \"language\": \"ja,zh-CN-shandong,zh-CN-sichuan\",\n \"source_language\": \"en\",\n \"lipsync\": false,\n \"speaker_num\": 1,\n \"webhookUrl\": \"\",\n \"remove_bgm\": true,\n \"caption_type\": 2,\n \"caption_url\": \"https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt\",\n \"studio_voice\": {\n \"no_translate_words\": [\n \"kaka\",\n \"lal\"\n ],\n \"fixed_words\": {\n \"hi\": \"hello\",\n \"bad\": \"good\"\n },\n \"pronounced_words\": {\n \"lel\": \"lele\",\n \"gga\": \"gaga\"\n },\n \"style\": \"professional\"\n },\n \"dynamic_duration\": false\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"msg": "<string>",
"data": {
"_id": "<string>",
"video_status": 123,
"video": "<string>"
}
}Create Video Translation
Translate videos into multiple languages with AI voices and lip-sync
curl --request POST \
--url https://openapi.akool.com/api/open/v3/content/video/createbytranslate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4",
"language": "ja,zh-CN-shandong,zh-CN-sichuan",
"source_language": "en",
"lipsync": false,
"speaker_num": 1,
"webhookUrl": "",
"remove_bgm": true,
"caption_type": 2,
"caption_url": "https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt",
"studio_voice": {
"no_translate_words": [
"kaka",
"lal"
],
"fixed_words": {
"hi": "hello",
"bad": "good"
},
"pronounced_words": {
"lel": "lele",
"gga": "gaga"
},
"style": "professional"
},
"dynamic_duration": false
}
'import requests
url = "https://openapi.akool.com/api/open/v3/content/video/createbytranslate"
payload = {
"url": "https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4",
"language": "ja,zh-CN-shandong,zh-CN-sichuan",
"source_language": "en",
"lipsync": False,
"speaker_num": 1,
"webhookUrl": "",
"remove_bgm": True,
"caption_type": 2,
"caption_url": "https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt",
"studio_voice": {
"no_translate_words": ["kaka", "lal"],
"fixed_words": {
"hi": "hello",
"bad": "good"
},
"pronounced_words": {
"lel": "lele",
"gga": "gaga"
},
"style": "professional"
},
"dynamic_duration": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4',
language: 'ja,zh-CN-shandong,zh-CN-sichuan',
source_language: 'en',
lipsync: false,
speaker_num: 1,
webhookUrl: '',
remove_bgm: true,
caption_type: 2,
caption_url: 'https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt',
studio_voice: {
no_translate_words: ['kaka', 'lal'],
fixed_words: {hi: 'hello', bad: 'good'},
pronounced_words: {lel: 'lele', gga: 'gaga'},
style: 'professional'
},
dynamic_duration: false
})
};
fetch('https://openapi.akool.com/api/open/v3/content/video/createbytranslate', 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://openapi.akool.com/api/open/v3/content/video/createbytranslate",
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([
'url' => 'https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4',
'language' => 'ja,zh-CN-shandong,zh-CN-sichuan',
'source_language' => 'en',
'lipsync' => false,
'speaker_num' => 1,
'webhookUrl' => '',
'remove_bgm' => true,
'caption_type' => 2,
'caption_url' => 'https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt',
'studio_voice' => [
'no_translate_words' => [
'kaka',
'lal'
],
'fixed_words' => [
'hi' => 'hello',
'bad' => 'good'
],
'pronounced_words' => [
'lel' => 'lele',
'gga' => 'gaga'
],
'style' => 'professional'
],
'dynamic_duration' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-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://openapi.akool.com/api/open/v3/content/video/createbytranslate"
payload := strings.NewReader("{\n \"url\": \"https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4\",\n \"language\": \"ja,zh-CN-shandong,zh-CN-sichuan\",\n \"source_language\": \"en\",\n \"lipsync\": false,\n \"speaker_num\": 1,\n \"webhookUrl\": \"\",\n \"remove_bgm\": true,\n \"caption_type\": 2,\n \"caption_url\": \"https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt\",\n \"studio_voice\": {\n \"no_translate_words\": [\n \"kaka\",\n \"lal\"\n ],\n \"fixed_words\": {\n \"hi\": \"hello\",\n \"bad\": \"good\"\n },\n \"pronounced_words\": {\n \"lel\": \"lele\",\n \"gga\": \"gaga\"\n },\n \"style\": \"professional\"\n },\n \"dynamic_duration\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://openapi.akool.com/api/open/v3/content/video/createbytranslate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4\",\n \"language\": \"ja,zh-CN-shandong,zh-CN-sichuan\",\n \"source_language\": \"en\",\n \"lipsync\": false,\n \"speaker_num\": 1,\n \"webhookUrl\": \"\",\n \"remove_bgm\": true,\n \"caption_type\": 2,\n \"caption_url\": \"https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt\",\n \"studio_voice\": {\n \"no_translate_words\": [\n \"kaka\",\n \"lal\"\n ],\n \"fixed_words\": {\n \"hi\": \"hello\",\n \"bad\": \"good\"\n },\n \"pronounced_words\": {\n \"lel\": \"lele\",\n \"gga\": \"gaga\"\n },\n \"style\": \"professional\"\n },\n \"dynamic_duration\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.akool.com/api/open/v3/content/video/createbytranslate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://d11fbe263bhqij.cloudfront.net/agicontent/video/translate/cut3_content_create_EN_01.mp4\",\n \"language\": \"ja,zh-CN-shandong,zh-CN-sichuan\",\n \"source_language\": \"en\",\n \"lipsync\": false,\n \"speaker_num\": 1,\n \"webhookUrl\": \"\",\n \"remove_bgm\": true,\n \"caption_type\": 2,\n \"caption_url\": \"https://drz0f01yeq1cx.cloudfront.net/1759979948074-b14aeb874a4547ca81373d140edd02d2-1758273867083fa8fa1ca7cfe409ab7fb07abdb931660translatedsubtitles.srt\",\n \"studio_voice\": {\n \"no_translate_words\": [\n \"kaka\",\n \"lal\"\n ],\n \"fixed_words\": {\n \"hi\": \"hello\",\n \"bad\": \"good\"\n },\n \"pronounced_words\": {\n \"lel\": \"lele\",\n \"gga\": \"gaga\"\n },\n \"style\": \"professional\"\n },\n \"dynamic_duration\": false\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"msg": "<string>",
"data": {
"_id": "<string>",
"video_status": 123,
"video": "<string>"
}
}merge_interval and face_enhance parameters have been deprecated and are no longer supported.Authorizations
Body
The video URL address you want to translate
Target language(s) for translation. For multiple languages, separate with commas (e.g., "ja,zh-CN-shandong,zh-CN-sichuan")
The original language of the video. Use "DEFAULT" for automatic language detection, or specify a language code (e.g., "en" for English, "zh" for Chinese, "es" for Spanish)
Enable synchronized mouth movements with the audio track in translated video
Callback URL address for HTTP notifications when processing completes
Number of speakers in the video (0 = Auto Detect)
Whether to remove background music from the video
Caption handling: 0=none, 1=add original subtitle, 2=add target subtitle, 3=translate and replace original subtitle, 4=add translated subtitle
0, 1, 2, 3, 4 Subtitle file URL (supports SRT or ASS files)
Advanced voice and translation settings
Show child attributes
Show child attributes
Control the dynamic duration of the video