Polyv Help Center

Help Center

outlineTask

Updated: 2026-03-03 16:13:04

1. Create Video Outline Task

Description

通过视频id,创建该视频的视频大纲分析任务,分析完成会以http回调的方式把分析结果回调回去,回调地址暂时请您联系保利威客服人员帮您配置
如果视频没有字幕, 会先自动使用保利威的智能字幕生成字幕, 并且生成的字幕会默认应用到该视频上
接口地址(仅做说明使用): http://api.polyv.net/vod/v4/video-outline/create

Call Constraints

  1. The API call is subject to rate limits. For details, please refer to [/vod/java/limit]. For common call exceptions, please refer to [/vod/java/exceptionDoc].

Unit Test

    @Test
    public void testCreateTaskSuccess() throws IOException, NoSuchAlgorithmException {
        VideoOutlineTaskCreateRequest videoOutlineTaskCreateRequest = new VideoOutlineTaskCreateRequest();
        Long vodCreateTaskSuccessResponse = null;
        try {
            videoOutlineTaskCreateRequest.setVid(vid);
            vodCreateTaskSuccessResponse = new VodOutlineTaskServiceImpl().createTask(videoOutlineTaskCreateRequest);
            Assert.assertNotNull(vodCreateTaskSuccessResponse);
            if (vodCreateTaskSuccessResponse != null) {
                log.debug("创建视频大纲任务成功");
            }
        }catch (PloyvSdkException e){
            //参数校验不合格 或者 请求服务器端500错误,错误信息见PloyvSdkException.getMessage()
            log.error(e.getMessage(), e);
            // 异常返回做B端异常的业务逻辑,记录log 或者 上报到ETL 或者回滚事务
            throw e;
        } catch (Exception e) {
            log.error("SDK调用异常", e);
            throw e;
        }
    }

Unit Test Description

  1. If the request is correct, a Long object is returned, and the B-side processes business logic based on this object.

  2. If the request parameter validation fails, a PloyvSdkException is thrown. The error message can be found in PloyvSdkException.getMessage(), for example: [ Input parameter [xxx.chat.VodxxxRequest] object validation failed, failed fields [pic cannot be empty / msg cannot be empty] ]

  3. If the server encounters an exception during processing, a PloyvSdkException is thrown. The error message can be found in PloyvSdkException.getMessage(), for example: [ Polyv request returned data error, request serial number: 66e7ad29fd04425a84c2b2b562d2025b, error reason: invalid signature. ]

Request Parameter Description

Parameter Required Type Description
vid true String Video ID [corresponds to the vid field in the API documentation]

Return Object Description

taskId: The ID of the created task



联系客服,在线咨询