Skip to main content
POST
/
v1
/
video_translate
Translates a video into one or more supported languages
curl --request POST \
  --url https://test-api.keevx.com/v1/video_translate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "target_languages": [
    "English",
    "Chinese"
  ],
  "video_url": "https://example.com/test-video.mp4",
  "speaker_num": 1,
  "translate_audio_only": true,
  "enable_dynamic_duration": true,
  "enable_caption": false,
  "name": "English-videoTranslation-2020120123001",
  "callback_url": "https://your-server.com/callback"
}
'
{
  "code": 0,
  "msg": "ok",
  "data": [
    {
      "task_id": "vt-d6b6472bcf724d0399e06d1390cb964e",
      "language": "English"
    }
  ]
}

Callback Notification

After the video generation task is processed, the service will send a POST request to the callback_url provided in the initiation request.

Structure

code
integer
Response status code. 0 indicates a successful callback transmission.
msg
string
Response message, usually “ok”.
task_type
string
The type of the task. Enum: image_to_video.
data
object
The payload containing the generation results.

Callback Example

{
    "code": 0,
    "msg": "ok",
    "task_type": "image_to_video",
    "data": {
        "task_id": "i2v-d6b6472bcf724d0399e06d1390cb964e",
        "status": "SUCCEEDED",
        "video_url": "https://storage.googleapis.com/xiling_us_central1_bucket/backend-saas-cdn/image-to-video/9966750584897124421/sample_0.mp4",
        "thumbnail_url": "https://storage.googleapis.com/xiling_us_central1_bucket/backend-saas-cdn/video-ai/tmp/image2video/veo/022934e6-b6d2-4d15-a320-cd60f6e43ae3/i2v-d6b6472bcf724d0399e06d1390cb964e.webp",
        "error_message": ""
    }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create an video translation task. Supports models V, KL, and S.

target_languages
string[]
required

supported language codes

Example:
["English", "Chinese"]
video_url
string<uri>
required

URL of the video file to be translated.

Example:

"https://example.com/test-video.mp4"

speaker_num
integer
default:0

Number of speakers in the video.

Required range: x >= 0
Example:

1

translate_audio_only
boolean
default:false

Translate only the audio, ignore the faces and only translate the voice track in this video.

Example:

true

enable_dynamic_duration
boolean
default:true

Stretch or shrink portions of your video to enhance conversational fluidity and translation quality between languages with different speaking rates

Example:

true

enable_caption
boolean
default:false

Generate subtitles

Example:

false

name
string

Video name, with a character length of less than 100, the name after video translation is: target language+"-"+name, such as English_myTestVideo; If the value is passed empty or not, the name of the ending name for video translation is: target language+"-"+videoTranslate+"-" second level timestamp, for example: English-videoTranslation-2020120123001

Example:

"English-videoTranslation-2020120123001"

callback_url
string<uri>

Callback URL for task completion notification.

Example:

"https://your-server.com/callback"

Response

Task created successfully

Task creation response wrapper

code
integer
required

Status code (0 indicates success)

Example:

0

msg
string
required

Response message

Example:

"ok"

data
object[]
required

Payload containing the generated task IDs and languages