Skip to content
Platform / Docs / Smart editing — template details API

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-Typeapplication/json

鉴权说明:请在 URL 参数或 JSON Body 中携带 key(平台 API 密钥)。使用 POST + JSON 时,key 必须写在 JSON Body 内。

请求参数说明:

名称必填类型示例值说明
key是string你的密钥平台 API 密钥
id是string6a2668a137004e003477b6ed模板 ID(也兼容字段名 template_id)

返回参数说明:

名称类型说明
codeint200 成功
msgstring状态信息
data.result.data.idstring模板 ID
data.result.data.namestring模板名称
data.result.data.coverUrlstring封面 URL
data.result.data.scenestring应用场景
data.result.data.videoStructInfoobject模板结构(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 或权限不足。

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