Topview-api
    Topview-api
    • API文档
    • Avatar Marketing Video
      • script
        • list script content
        • update script content
      • submit task
        POST
      • query task
        GET
      • export
        POST
    • Video Avatar
      • Video Avatar API Usage
      • submit task
        POST
      • query task
        GET
    • Product Avatar
      • Product Avatar API Usage
      • Replace Product Image
        • submit task
        • query task
      • Image2Video
        • submit task
        • query task
      • Category Query
        GET
      • Public product avatar Query
        GET
    • Product AnyShoot
      • Replace Product Image
        • submit task
        • query task
      • Template Category
        GET
      • Template List
        GET
    • Common Task
      • image2Video
        • submit task
        • query task
    • Scraper
      • submit scraper task
        POST
      • query scraper task
        GET
    • Upload
      • Get Upload Credential
        GET
      • Get Upload Check
        GET
    • check notice url
      POST
    • Voice Query
      GET
    • Ethnicity Query
      GET
    • AiAvatar Query
      GET
    • Caption List
      GET

    API文档

    域名#

    https://api.topview.ai

    授权#

    1.
    TOPVIEW_API_KEY:点击页面头像-》【API Settings】获取
    2.
    Topview-Uid:当前可双击topview页面头像复制,或者线下查询
    3.
    Authentication: Bearer + TOPVIEW_API_KEY

    Upload#

    1.
    Step1: 获取授权
    Upload - Get Upload Credential
    2.
    Step2: 上传到S3
    3.
    Step3:检查是否上传成功
    Upload - Get Upload Check

    Avatar Marketing Video#

    提交任务:#

    Avatar Marketing Video - submit task

    查询任务:#

    Avatar Marketing Video - query task
    注意
    1.
    如果需要本地素材进行制作,需要调用 Upload 接口上传,获取fileId后,再提交任务
    2.
    如果只使用本地素材制作(不使用链接),并且素材全部都是图片,那么图片数量需要大于10张
    3.
    如果需要其他音色,可以查询 Voice Query
    4.
    如果需要数字人,可以查询 AiAvatar Query

    脚本#

    获取脚本内容#

    Avatar Marketing Video - script - list script content

    修改脚本#

    Avatar Marketing Video - script - update script content

    Video Avatar#

    1. 使用方法#

    详见Video Avatar API Usage。

    2. 支持接口#

    人种列表查询#

    Ethnicity Query

    公模avatar类目查询#

    Category Query

    音色查询接口#

    Voice Query

    Product Avatar#

    1、支持接口#

    人种列表查询#

    Ethnicity Query

    公模avatar类目查询#

    Category Query

    公模avatar列表查询#

    Public product avatar Query

    2. 替换商品图片任务#

    提交任务#

    Product Avatar - Replace Product Image - submit task

    获取结果#

    Product Avatar - Replace Product Image - query task

    3. 图片生成视频任务#

    提交任务#

    Product Avatar - image2Video - submit task

    获取结果#

    Product Avatar - image2Video - query task
    注意:
    1、Product Avatar - Replace Product Image - submit task接口的xxxFileId字段。需要先获取文件临时凭证,再upload到s3,上传成功后再将临时凭证的fileId设置到xxxFileId字段中。具体步骤看Upload file
    2、Product Avatar - image2Video - submit task接口的productReplaceResultKey字段,必须是 Product Avatar - Replace Product Image - query task 响应数据中result-productReplaceResult-key的key。例如Replace Product Image - query task返回数据如下,那么key就是21f48762080b42f1b718ad722f92c
    {
        "code": "200",
        "message": "Success",
        "result": {
            "taskId": "176bd1a50ba8437db36af5eb8fd9e5ca",
            "taskStatus": "success",
            "productReplaceResult": [
                {
                    "key": "21f48762080b42f1b718ad722f92c",
                    "url": "https://aigc.s3.amazonaws.com/analyzed_video/video/21f48762080b42f1b718ad722f92cbb1/21f48762080b42f1b718ad722f92cbb1.jpg"
                }
            ]
        }
    }

    Product Anyshoot#

    1、支持接口#

    模板列表查询#

    Template List

    模板类目查询#

    Template Category

    2. AnyShoot替换商品图片任务#

    提交任务#

    Product AnyShoot - Replace Product Image - submit task

    获取结果#

    Product AnyShoot - Replace Product Image - query task
    注意:
    1.
    productMaskFileIdmask文件尺寸必须与productImageFileId的文件尺寸保持一致;
    2.
    templateMaskFileIdmask文件尺寸必须与templateImageFileId的文件尺寸保持一致;
    3.
    productImageFileId、productMaskFileId、templateImageFileId、templateMaskFileId均需要通过 upload file 来获得fileId;
    4.
    若templateId、templateImageFileId均传值,则优先使用templateImageFileId文件。

    Common Task#

    Image2Video#

    提交任务#

    Common Task - image2Video - submit task

    获取结果#

    Common Task - image2Video - query task

    回调地址#

    1.
    Step1: 通过接口 check notice url 验证回调地址${call_back_notice}的合法性
    2.
    Step2: 往submit task接口添加noticeUrl字段来设置回调地址
    3.
    Step3: 回调接口接收数据。topview服务端会往${call_back_notice}发送query task接口的 result 数据
    4.
    Step4: 回调接口返回数据。回调接口需要返回响应数据给topview服务端
    时序图
    未命名绘图.drawio (2).png
    举个例子
    Step1:回调地址http://127.0.0.1:8080/notice,假设调用 check notice url 验证合法;
    Step2: 往 Avatar Marketing Video - submit task 接口添加noticeUrl
    Step3: 假设 Avatar Marketing Video - query task 的查询结果为下面结果:
    {
        "code": "200",
        "message": "Success",
        "result": {
            "taskId": "0d3a303bfc1f4f0e9a287ba47dbbefbc",
            "status": "success",
            "errorMsg": null,
            "exportVideos": [
                {
                    "scriptId": 0,
                    "status": null,
                    "title": null,
                    "description": null,
                    "videoUrl": null,
                    "coverUrl": null,
                    "videoDuration": null
                }
            ],
            "previewVideos": [
                {
                    "scriptId": 0,
                    "status": "success",
                    "title": null,
                    "description": null,
                    "videoUrl": "https://aigc.s3.amazonaws.com/analyzed_video/task/export/487a84446461405088b751861d497dfd_topview.ai.mp4",
                    "coverUrl": "https://aigc.s3.amazonaws.com/analyzed_video/task/export/487a84446461405088b751861d497dfd.jpg",
                    "videoDuration": 36096000
                }
            ]
        }
    }
    那么回调接口接受的到结果为:
    Step4: 同时回调接口返回响应数据
    Modified at 2025-06-13 06:53:00
    Next
    list script content
    Built with