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-Type | application/json |
请求参数说明:
| 名称 | 必填 | 类型 | 示例值 | 说明 |
|---|---|---|---|---|
| url | 是 | string | https://example.com/video.mp4 | 视频URL,必须为可解析的HTTP/HTTPS协议URL |
| language | 是 | string | en-US | 目标翻译语言,如:zh-CN、en-US、en |
| original_srt_url | 否 | string | https://example.com/original.srt | 原始SRT字幕文件URL |
| translate_srt_url | 否 | string | https://example.com/translate.srt | 翻译SRT字幕文件URL |
| speaker_identification | 否 | int | 0 | 区分说话人。0-不区分(默认),1-区分说话人 |
| voice | 否 | string | cv_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。
预览后如何出片?
进入合成与导出任务接口继续流程。
能否跳过预览?
视你的产品流程而定;文档允许的路径可直接合成。
Related APIs
- AI video translation — query preview API
- AI video translation — create render API
- AI video translation — voice list API
Full console doc (with the debugger):/doc/33