API Reference
Smart editing — template details API
POST
smartclip-template-detail-api
ID 24
Get one smart-editing template, including canvas and layer structure.
POST
https://xiaoapis.com/api/smartclip/template_detail
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/smartclip/template_detail
Content-Type: application/json
{
"key": "YOUR_API_KEY"
}
Request example
https://xiaoapis.com/api/smartclip/template_detail?key=你的密钥
Details
请求HEADER:
| 名称 | 值 |
|---|---|
| Content-Type | application/json |
鉴权说明:请在 URL 参数或 JSON Body 中携带 key(平台 API 密钥)。使用 POST + JSON 时,key 必须写在 JSON Body 内。
请求参数说明:
| 名称 | 必填 | 类型 | 示例值 | 说明 |
|---|---|---|---|---|
| key | 是 | string | 你的密钥 | 平台 API 密钥 |
| id | 是 | string | 6a2668a137004e003477b6ed | 模板 ID(也兼容字段名 template_id) |
返回参数说明:
| 名称 | 类型 | 说明 |
|---|---|---|
| code | int | 200 成功 |
| msg | string | 状态信息 |
| data.result.data.id | string | 模板 ID |
| data.result.data.name | string | 模板名称 |
| data.result.data.coverUrl | string | 封面 URL |
| data.result.data.scene | string | 应用场景 |
| data.result.data.videoStructInfo | object | 模板结构(canvas、headerLayer、subtitleLayer 等图层) |
Response example
{
"code": 200,
"msg": "success",
"data": {
"result": {
"code": "Succeed",
"data": {
"id": "6a2668a137004e003477b6ed",
"name": "双语大橙",
"coverUrl": "https://example.com/cover.jpg",
"scene": "realMan",
"videoStructInfo": {
"editInfo": {
"canvas": {
"width": 1080,
"height": 1920
}
}
}
}
}
}
}
FAQ
什么时候需要模板详情?
需要了解画布尺寸、图层开关或做 structLayers 定制时,先拉模板详情。
如何查询?
传入模板 id(与列表返回的 id 一致)及 API Key。
和模板列表的区别?
列表给出摘要;详情给出视频结构与图层级信息。
能否修改模板本身?
详情用于读取结构;成片时通过 create 参数控制包装,不直接改平台模板库。
失败常见原因?
模板 id 无效、未携带 key 或权限不足。
Related APIs
- Smart editing — template list API
- Smart editing — presenter video API
- Smart editing — voiceover montage API
Full console doc (with the debugger):/doc/24