Skip to content
Platform / Docs / AI video translation — create preview API

API Reference

AI video translation — create preview API

POST video-translation-preview-api ID 33

Create a video-translation preview before render and export.

POST https://xiaoapis.com/api/video_translation/preview

Overview

  • 创建预览任务
  • 异步查询

Use cases

  • 翻译效果预览
  • 字幕校对前预览
Conventions
  • Gateway · https://xiaoapis.com
  • Auth · send key (query or JSON body, as this API specifies)
  • Response · JSON. Check the business code and the HTTP status, not only HTTP 200

Authentication

Send the platform API key (query parameter key or JSON field key, as this page specifies). Create one in API key management.

POST https://xiaoapis.com/api/video_translation/preview
Content-Type: application/json

{
  "key": "YOUR_API_KEY"
}

Request example

https://xiaoapis.com/api/video_translation/preview?key=你的密钥

Details

请求HEADER:

名称值
Content-Typeapplication/json

请求参数说明:

名称必填类型示例值说明
url是stringhttps://example.com/video.mp4视频URL,必须为可解析的HTTP/HTTPS协议URL
language是stringen-US目标翻译语言,如:zh-CN、en-US、en
original_srt_url否stringhttps://example.com/original.srt原始SRT字幕文件URL
translate_srt_url否stringhttps://example.com/translate.srt翻译SRT字幕文件URL
speaker_identification否int0区分说话人。0-不区分(默认),1-区分说话人
voice否stringcv_longanhuan音色标识

Response example

{"code":200,"msg":"任务已提交","data":{"id":1,"task_id":"abc123-def456-ghi789","status":1,"video_duration": 90,"power_cost": 40,"progress":0}}

FAQ

预览任务是什么?

在正式导出前生成翻译预览(字幕/音频等),便于确认效果。

必填参数?

视频 URL、目标语种与音色等,见文档。

如何查询预览结果?

使用「查询预览任务」接口与 task_id。

预览后如何出片?

进入合成与导出任务接口继续流程。

能否跳过预览?

视你的产品流程而定;文档允许的路径可直接合成。

Full console doc (with the debugger):/doc/33