tencent cloud

Create a workflow
Last updated: 2025-09-09 20:46:29
Create a workflow
Last updated: 2025-09-09 20:46:29

Feature Description

Create a workflow.

Authorization Description

When used by a sub-account, the ci:CreateMediaWorkflow permission is required. For details, see Cloud Infinite action.

Service Activation

Using this feature requires enabling Cloud Infinite in advance and binding a bucket. For details, see Binding a Bucket.

Use Limits

When using this API, please first confirm the relevant restrictions. For details, see Usage Limits.


Request

Request sample

POST /workflow HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Content-Length: <length>
Content-Type: application/xml

<body>
Note:
Authorization: Auth String. For details, see Request Signature document.

Request header.

This API only uses common request headers. For details, see Common Request Headers documentation.

Request body.

The implementation of this request operation requires the following request body:
Request Body 1
Request Body 2
Perform screenshot and transcoding processing on the input video file. After video transcoding, simultaneously perform repackaging processing and generate an intelligent cover, then perform image processing on the generated cover.
<Request>
<MediaWorkflow>
<Name>workflow-1</Name>
<State>Active</State>
<Topology>
<Dependencies>
<Start>Snapshot_1581665960536,Transcode_1581665960538</Start>
<Snapshot_1581665960536>End</Snapshot_1581665960536>
<Transcode_1581665960538>Segment_15816659605667,SmartCover_1581665960539</Transcode_1581665960538>
<Segment_15816659605667>End</Segment_15816659605667>
<SmartCover_1581665960539>PicProcess_15816659605668</SmartCover_1581665960539>
<PicProcess_15816659605668>End</PicProcess_15816659605668>
</Dependencies>
<Nodes>
<Start>
<Type>Start</Type>
<Input>
<ObjectPrefix>input/workflow-1</ObjectPrefix>
<NotifyConfig>
<State>On</State>
<Url>http://www.callback.com</Url>
<Event>TaskFinish,WorkflowFinish</Event>
<Type>Url</Type>
<ResultFormat>JSON</ResultFormat>
</NotifyConfig>
<ExtFilter>
<State>On</State>
<Video>true</Video>
<Audio>false</Audio>
<Image>false</Image>
<Custom>false</Custom>
<AllFile>false</AllFile>
</ExtFilter>
</Input>
</Start>
<Snapshot_1581665960536>
<Type>Snapshot</Type>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>abc/${RunId}/snapshot-${number}.${Ext}</Object>
<SpriteObject>abc/${RunId}/sprite-${number}.${Ext}</SpriteObject>
</Output>
</Operation>
</Snapshot_1581665960536>
<Transcode_1581665960538>
<Type>Transcode</Type>
<Operation>
<TemplateId>t16e81a29fe48c4e23acefc247a7792b63</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>bcd/${RunId}/trans.{Ext}</Object>
</Output>
</Operation>
</Transcode_1581665960538>
<Segment_15816659605667>
<Type>Segment</Type>
<Operation>
<Segment>
<Format>mkv</Format>
<Duration>20</Duration>
</Segment>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>test-trans${Number}.{Ext}</Object>
</Output>
</Operation>
</Segment_15816659605667>
<SmartCover_1581665960539>
<Type>SmartCover</Type>
<Operation>
<TemplateId>t16e81a29fe48c4e23acefc247a7792b63</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>abc/${RunId}/cover-${Number}.{Ext}</Object>
</Output>
</Operation>
</SmartCover_1581665960539>
<PicProcess_15816659605668>
<Type>PicProcess</Type>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>bcd/${RunId}/pic.{Ext}</Object>
</Output>
</Operation>
</PicProcess_15816659605668>
</Nodes>
</Topology>
</MediaWorkflow>
</Request>
adaptive bitrate
<Request>
<MediaWorkflow>
<Name>workflow-2</Name>
<State>Active</State>
<Topology>
<Dependencies>
<Start>StreamPackConfig_1581665960532</Start>
<StreamPackConfig_1581665960532>VideoStream_1581665960536,VideoStream_1581665960537</StreamPackConfig_1581665960532>
<VideoStream_1581665960536>StreamPack_1581665960538</VideoStream_1581665960536>
<VideoStream_1581665960537>StreamPack_1581665960538</VideoStream_1581665960537>
<StreamPack_1581665960538>End</StreamPack_1581665960538>
</Dependencies>
<Nodes>
<Start>
<Type>Start</Type>
<Input>
<ObjectPrefix>input/workflow-2</ObjectPrefix>
<NotifyConfig>
<State>On</State>
<Url>http://www.callback.com</Url>
<Event>TaskFinish,WorkflowFinish</Event>
<Type>Url</Type>
<ResultFormat>JSON</ResultFormat>
</NotifyConfig>
<ExtFilter>
<State>On</State>
<Video>true</Video>
<Audio>false</Audio>
<Image>false</Image>
<Custom>false</Custom>
<AllFile>false</AllFile>
</ExtFilter>
</Input>
</Start>
<StreamPackConfig_1581665960532>
<Type>StreamPackConfig</Type>
<Operation>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>${InputPath}/${InputName}._${RunId}.${ext}</Object>
</Output>
<StreamPackConfig>
<PackType>HLS</PackType>
<IgnoreFailedStream>true</IgnoreFailedStream>
</StreamPackConfig>
</Operation>
</StreamPackConfig_1581665960532>
<VideoStream_1581665960536>
<Type>VideoStream</Type>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>${RunId}_Substream_1/video.m3u8</Object>
</Output>
</Operation>
</VideoStream_1581665960536>
<VideoStream_1581665960537>
<Type>VideoStream</Type>
<Operation>
<TemplateId>t1460606bgfdg2148c4ab182f55163ba7bj</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>${RunId}_Substream_2/video.m3u8</Object>
</Output>
</Operation>
</VideoStream_1581665960537>
<StreamPack_1581665960538>
<Type>StreamPack</Type>
<Operation>
<StreamPackInfo>
<VideoStreamConfig>
<VideoStreamName>VideoStream_1581665960536</VideoStreamName>
<BandWidth>200000000</BandWidth>
</VideoStreamConfig>
<VideoStreamConfig>
<VideoStreamName>VideoStream_1581665960537</VideoStreamName>
<BandWidth>200000000</BandWidth>
</VideoStreamConfig>
</StreamPackInfo>
</Operation>
</StreamPack_1581665960538>
</Nodes>
</Topology>
</MediaWorkflow>
</Request>
The data are described as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Request
None.
Container for saving requests
Container
Yes
Data description for Container type
Request
:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
MediaWorkflow
Request
Workflow node
Container
Yes
Data description for Container type MediaWorkflow:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Name
Request.MediaWorkflow
workflow name
String
Yes
Supports Chinese, English, digits, — and _, with a length limit of 128 characters.
State
Request.MediaWorkflow
workflow status
String
No
Paused/Active
Topology
Request.MediaWorkflow
topology information
Container
Yes
None.
Data description for Container type
Topology
:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Dependencies
Request.MediaWorkflow.Topology
Node Dependency
Container
Yes
None.
Nodes
Request.MediaWorkflow.Topology
Node List
Container
Yes
None.
Data description for Container type Nodes:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Start
Request.MediaWorkflow.Topology.Nodes
Start Node
Container
Yes
Only a unique start node
Animation_***
Request.MediaWorkflow.Topology.Nodes
Animated GIF Type Node
Container
No
Node names are prefixed with Animation, and there may be multiple animated nodes.
Snapshot_***
Request.MediaWorkflow.Topology.Nodes
Screenshot Type Node
Container
No
Node names are prefixed with Snapshot, and there may be multiple screenshot nodes.
SmartCover_***
Request.MediaWorkflow.Topology.Nodes
Intelligent Cover Node
Container
No
Node names are prefixed with SmartCover, and there may be multiple intelligent cover nodes.
Transcode_***
Request.MediaWorkflow.Topology.Nodes
Transcode Node
Container
No
Node names are prefixed with Transcode, and there may be multiple transcode nodes.
Concat_***
Request.MediaWorkflow.Topology.Nodes
Audio/Video splicing node
Container
No
Node names are prefixed with Concat, and there may be multiple audio/video splicing nodes.
VoiceSeparate_***
Request.MediaWorkflow.Topology.Nodes
Voice node
Container
No
Node names are prefixed with VoiceSeparate, and there may be multiple voice separation nodes.
VideoMontage_***
Request.MediaWorkflow.Topology.Nodes
Highlight node
Container
No
Node names are prefixed with VideoMontage, and there may be multiple highlight nodes.
StreamPackConfig_***
Request.MediaWorkflow.Topology.Nodes
Adaptive Bitrate Node
Container
No
The node name must be prefixed with StreamPackConfig and can only have one adaptive bitrate node. It must be placed after the start node, and the following can only be video substream nodes, which can have multiple instances.
VideoStream_***
Request.MediaWorkflow.Topology.Nodes
video substream node
Container
No
Node name prefixed with VideoStream, may have multiple video substream nodes, can only be placed after StreamPackConfig node, and the following can only be StreamPack nodes.
StreamPack_***
Request.MediaWorkflow.Topology.Nodes
Adaptive Bitrate Streaming Packaging Node
Container
No
Node name prefixed with StreamPack, can only have one Adaptive Bitrate Streaming Packaging Node, can only be placed after video substream nodes, and the following can only be End Nodes.
VideoProcess_***
Request.MediaWorkflow.Topology.Nodes
Video Processing Node
Container
No
Node names are prefixed with VideoProcess, and there may be multiple video processing nodes.
SCF_***
Request.MediaWorkflow.Topology.Nodes
SCF Function Node
Container
No
Node names are prefixed with SCF, and there may be multiple SCF function nodes.
Segment_***
Request.MediaWorkflow.Topology.Nodes
Audio/Video Transmuxing Node
Container
No
Node names are prefixed with Segment, and there may be multiple audio/video transmuxing nodes.
PicProcess_***
Request.MediaWorkflow.Topology.Nodes
Image Processing Node
Container
No
Node names are prefixed with PicProcess, and there may be multiple Image Processing nodes.
Tts_***
Request.MediaWorkflow.Topology.Nodes
Text To Speech (TTS) Node
Container
No
Node names are prefixed with Tts, and there may be multiple Text To Speech (TTS) nodes.
SpeechRecognition_***
Request.MediaWorkflow.Topology.Nodes
Automatic Speech Recognition (ASR) Node
Container
No
Node names are prefixed with SpeechRecognition, and there may be multiple Automatic Speech Recognition (ASR) nodes.
VideoEnhance_***
Request.MediaWorkflow.Topology.Nodes
Enhanced Video Quality Node
Container
No
Node names are prefixed with VideoEnhance, and there may be multiple ASR nodes.
Condition_***
Request.MediaWorkflow.Topology.Nodes
Conditional Judgment Node
Container
No
Node names are prefixed with Condition, and there may be multiple conditional statement nodes.
MediaInfo_***
Request.MediaWorkflow.Topology.Nodes
Media Information Acquisition Node
Container
No
Node names are prefixed with MediaInfo, and there may be multiple media information acquisition nodes.
AIRecognition_***
Request.MediaWorkflow.Topology.Nodes
AI Recognition Node
Container
No
Node names are prefixed with AIRecognition
SegmentVideoBody_***
Request.MediaWorkflow.Topology.Nodes
Video Portrait Cropping Node
Container
No
Node names are prefixed with SegmentVideoBody
NoiseReduction_***
Request.MediaWorkflow.Topology.Nodes
Audio Noise Reduction Node
Container
No
Node names are prefixed with NoiseReduction
FileInfo_***
Request.MediaWorkflow.Topology.Nodes
File Information Node
Container
No
Node names are prefixed with FileInfo
ImageInspect_***
Request.MediaWorkflow.Topology.Nodes
Abnormal Image Detection Node
Container
No
Node names are prefixed with ImageInspect
Data description for Container type Start:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.Topology.Nodes.Start
Node Type
String
Yes
Start
Input
Request.MediaWorkflow.Topology.Nodes.Start
input information, for details, see Input
Container
Yes
None.
Data description for Container type Animation_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.Animation_***
Node Type
String
Yes
Animation
Operation
Request.MediaWorkflow.
Topology.Nodes.Animation_***
Operation rule. For details, see Animation.
Container
Yes
None.
Data description for Container type Snapshot_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.Snapshot_***
Node Type
String
Yes
Snapshot
Operation
Request.MediaWorkflow.
Topology.Nodes.Snapshot_***
Operation rule. For details, see Snapshot.
Container
Yes
None.
Data description for Container type SmartCover_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.SmartCover_***
Node Type
String
Yes
SmartCover
Operation
Request.MediaWorkflow.
Topology.Nodes.SmartCover_***
Operation rule. For details, see SmartCover.
Container
Yes
None.
Data description for Container type Transcode_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.Transcode_***
Node Type
String
Yes
Transcode
Operation
Request.MediaWorkflow.
Topology.Nodes.Transcode_***
Operation rule. For details, see Transcode.
Container
Yes
None.
Input
Request.MediaWorkflow.
Topology.Nodes.Transcode_***
Enter configuration
Container
No
None.
Data description for Container type MediaWorkflow_Topology_Nodes_Transcode_***_Operation.Input:
Node Name (Keyword)
Description
Type
Required
Limit
SpeedTranscodingQueueId
Accelerated transcoding queue
String
No
None.
Data description for Container type Concat_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.Concat_***
Node Type
String
Yes
Concat
Operation
Request.MediaWorkflow.
Topology.Nodes.Concat_***
Operation rule. For details, see Concat.
Container
Yes
None.
Data description for Container type VoiceSeparate_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.VoiceSeparate_***
Node Type
String
Yes
VoiceSeparate
Operation
Request.MediaWorkflow.
Topology.Nodes.VoiceSeparate_***
Operation rule. For details, see VoiceSeparate
Container
Yes
None.
Data description for Container type VideoMontage_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.VideoMontage_***
Node Type
String
Yes
VideoMontage
Operation
Request.MediaWorkflow.
Topology.Nodes.VideoMontage_***
Operation rule. For details, see VideoMontage.
Container
Yes
None.
The specific data description of the Container type StreamPackConfig_*** is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.StreamPackConfig_***
Node Type
String
Yes
StreamPackConfig
Operation
Request.MediaWorkflow.
Topology.Nodes.StreamPackConfig_***
Operation rule. For details, see StreamPackConfig.
Container
Yes
None.
Data description for Container type VideoStream_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.VideoStream_***
Node Type
String
Yes
VideoStream
Operation
Request.MediaWorkflow.
Topology.Nodes.VideoStream_***
Operation rule. For details, see VideoStream.
Container
Yes
None.
Data description for Container type StreamPack_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.StreamPack_***
Node Type
String
Yes
StreamPack
Operation
Request.MediaWorkflow.
Topology.Nodes.StreamPack_***
Operation rule. For details, see StreamPack.
Container
Yes
None.

Data description for Container type VideoProcess_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.VideoProcess_***
Node Type
String
Yes
VideoProcess
Operation
Request.MediaWorkflow.
Topology.Nodes.VideoProcess_***
Operation rule. For details, see VideoProcess.
Container
Yes
None.
Data description for Container type SCF_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.SCF_***
Node Type
String
Yes
SCF
Operation
Request.MediaWorkflow.
Topology.Nodes.SCF_***
Operation rule. For details, see SCF.
Container
Yes
None.
Data description for Container type SuperResolution_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.SuperResolution_***
Node Type
String
Yes
SuperResolution
Operation
Request.MediaWorkflow.
Topology.Nodes.SuperResolution_***
Operation rule. For details, see SuperResolution.
Container
Yes
None.
Data description for Container type Segment_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.Segment_***
Node Type
String
Yes
Segment
Operation
Request.MediaWorkflow.
Topology.Nodes.Segment_***
Operation rule. For details, see Segment.
Container
Yes
None.
Data description for Container type PicProcess_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.PicProcess_***
Node Type
String
Yes
PicProcess
Operation
Request.MediaWorkflow.
Topology.Nodes.PicProcess_***
Operation rules. For details, see PicProcess.
Container
Yes
None.
Data description for Container type Tts_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.Tts_***
Node Type
String
Yes
Tts
Operation
Request.MediaWorkflow.
Topology.Nodes.Tts_***
Operation rules. For details, see Tts.
Container
Yes
None.
Data description for Container type SpeechRecognition_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.SpeechRecognition_***
Node Type
String
Yes
SpeechRecognition
Operation
Request.MediaWorkflow.
Topology.Nodes.SpeechRecognition_***
Operation rule. For details, see SpeechRecognition.
Container
Yes
None.
Data description for Container type VideoEnhance_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.VideoEnhance_***
Node Type
String
Yes
VideoEnhance
Operation
Request.MediaWorkflow.
Topology.Nodes.VideoEnhance_***
Operation rule. For details, see VideoEnhance.
Container
Yes
None.
Data description for Container type Condition_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.Condition_***
Node Type
String
Yes
Condition
Operation
Request.MediaWorkflow.
Topology.Nodes.Condition_***
Operation rule. For details, see Condition.
Container
Yes
None.
Data description for Container type MediaInfo_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.MediaInfo_***
Node Type
String
Yes
MediaInfo
Data description for Container type FileInfo_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.FileInfo_***
Node Type
String
Yes
FileInfo
Operation
Request.MediaWorkflow.
Topology.Nodes.FileInfo_***
Operation rule. For details, see FileInfo.
Container
Yes
None.
Data description for Container type AIRecognition_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.AIRecognition_***
Node Type
String
Yes
AIRecognition
Data description for Container type SegmentVideoBody_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.SegmentVideoBody_***
Node Type
String
Yes
SegmentVideoBody
Operation
Request.MediaWorkflow.
Topology.Nodes.SegmentVideoBody_***
Operation rule. For details, see SegmentVideoBody.
Container
Yes
None.
Data description for Container type NoiseReduction_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.NoiseReduction_***
Node Type
String
Yes
NoiseReduction
Operation
Request.MediaWorkflow.
Topology.Nodes.NoiseReduction_***
Operation rule. For details, see NoiseReduction.
Container
Yes
None.
Data description for Container type ImageInspect_***:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Limit
Type
Request.MediaWorkflow.
Topology.Nodes.ImageInspect_***
Node Type
String
Yes
ImageInspect
Operation
Request.MediaWorkflow.
Topology.Nodes.ImageInspect_***
Operation rule. For details, see ImageInspect.
Container
Yes
None.
Workflow node dependencies are as follows:
Workflow Node Type
Connected Node Type Behind
Start
Snapshot,Animation,SmartCover,Transcode,Concat,VoiceSeparate,VideoMontage,StreamPackConfig,SDRtoHDR,VideoProcess,SCF,SuperResolution,Segment,PicProcess,Tts,SpeechRecognition,VideoEnhance,MediaInfo,AIRecognition,VideoEnhance,SegmentVideoBody,NoiseReduction,FileInfo
Snapshot
PicProcess,SCF,FileInfo,End
Animation
PicProcess,SCF,FileInfo,End
SmartCover
PicProcess,SCF,FileInfo,End
Transcode
Snapshot,Animation,SmartCover,Concat,VideoMontage,SDRtoHDR,VideoProcess,SCF,Segment,SpeechRecognition,VideoEnhance,MediaInfo,SegmentVideoBody,NoiseReduction,FileInfo,End
Concat
Transcode,Snapshot,Animation,SmartCover,SDRtoHDR,VideoProcess,SCF,Segment,VideoEnhance,MediaInfo,SegmentVideoBody,NoiseReduction,FileInfo,End
VoiceSeparate
SCF,SpeechRecognition,End
VideoMontage
Snapshot,Animation,SDRtoHDR,VideoProcess,SCF,SuperResolution,VideoEnhance,Segment,MediaInfo,SegmentVideoBody,NoiseReduction,FileInfo,End
StreamPackConfig
VideoStream
VideoStream
StreamPack
StreamPack
End
VideoProcess
Transcode,Concat,VideoMontage,VoiceSeparate,SmartCover,Animation,SDRtoHDR,SCF,Segment,SuperResolution,MediaInfo,SegmentVideoBody,End
SCF
SDRtoHDR,Snapshot,Transcode,Concat,VideoMontage,VoiceSeparate,SmartCover,Animation,VideoProcess,End
Segment
VideoEnhance,SegmentVideoBody,End
PicProcess
SCF,PicProcess,FileInfo,End
Tts
SCF,Transcode,FileInfo,End
SpeechRecognition
SCF,Tts,End
VideoEnhance
Transcode,VideoMontage,SmartCover,Animation,Snapshot,SCF,Segment,SpeechRecognition,VoiceSeparate,MediaInfo,FileInfo,End
MediaInfo
Condition,End
FileInfo
Condition,End
Condition
Transcode,SuperResolution,VideoProcess,Animation,Snapshot,VideoMontage,SmartCover,Concat,VideoEnhance,SpeechRecognition,VoiceSeparate,Segment,SDRtoHDR,SCF,End
NoiseReduction
Transcode,Segment,MediaInfo,Concat,SpeechRecognition,FileInfo,SCF,End
AIRecognition
End
SegmentVideoBody
FileInfo,End
ImageInspect
End
Note:
When a Condition type node is preceded by a FileInfo type node, the subsequent connectable nodes are determined based on the nodes that the FileInfo's preceding nodes can connect to (excluding FileInfo and MediaInfo types; a Condition type node cannot subsequently connect to FileInfo or MediaInfo nodes).
Wildcard characters supported in workflows
Wildcard
Meaning
${InputPath}
Input the file path (excluding the filename)
${InputName}
Input the file name (excluding the suffix)
${InputNameAndExt}
Filename of the input file (including suffix)
${RunId}
Instance Id
${Ext}
Encapsulation format suffix
${Jobid}
Task Id
${Number}
Output index, counting begins from 0, only supports Snapshot, SmartCover, Segment node
${Time}
Screencapturing time point (unit: ms), only supported on Snapshot nodes

Response

Response Headers

This API only returns the public response header. For details, see Common Response Headers documentation.

Response Body

The response body is returned as application/xml. An example including the complete node data is shown below:
The data are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None.
Container for saving results
Container
Container node
Response
content:
Node Name (Keyword)
Parent Node
Description
Type
RequestId
Response
unique request ID
String
MediaWorkflow
Response
workflow array
Container
Content of the Container node MediaWorkflow:
Node Name (Keyword)
Parent Node
Description
Type
Name
Response.MediaWorkflow
workflow name
String
WorkflowId
Response.MediaWorkflow
workflow ID
String
State
Response.MediaWorkflow
Workflow status
String
CreateTime
Response.MediaWorkflow
Creation time
String
UpdateTime
Response.MediaWorkflow
Update time
String
Topology
Response.MediaWorkflow
Topology information, same as in-request Request.MediaWorkflow.Topology
Container

Error Codes

This request returns common error responses and error codes. For more information, see Error Codes.

Examples

Request 1
Response 1
Request2
Response 2
Perform screenshot and transcoding processing on the input video file. After video transcoding, simultaneously perform repackaging processing and generate an intelligent cover, then perform image processing on the generated cover.
POST /workflow HTTP/1.1
Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=************************************************
Host: test-1234567890.ci.ap-chongqing.myqcloud.com
Content-Length: 166
Content-Type: application/xml

<Request>
<MediaWorkflow>
<Name>workflow-1</Name>
<State>Active</State>
<Topology>
<Dependencies>
<Start>Snapshot_1581665960536,Transcode_1581665960538</Start>
<Snapshot_1581665960536>End</Snapshot_1581665960536>
<Transcode_1581665960538>Segment_15816659605667,SmartCover_1581665960539</Transcode_1581665960538>
<Segment_15816659605667>End</Segment_15816659605667>
<SmartCover_1581665960539>PicProcess_15816659605668</SmartCover_1581665960539>
<PicProcess_15816659605668>End</PicProcess_15816659605668>
</Dependencies>
<Nodes>
<Start>
<Type>Start</Type>
<Input>
<ObjectPrefix>input/workflow-1</ObjectPrefix>
<NotifyConfig>
<State>On</State>
<Url>http://www.callback.com</Url>
<Event>TaskFinish,WorkflowFinish</Event>
<Type>Url</Type>
<ResultFormat>JSON</ResultFormat>
</NotifyConfig>
<ExtFilter>
<State>On</State>
<Video>true</Video>
<Audio>false</Audio>
<Image>false</Image>
<Custom>false</Custom>
<AllFile>false</AllFile>
</ExtFilter>
</Input>
</Start>
<Snapshot_1581665960536>
<Type>Snapshot</Type>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>abc/${RunId}/snapshot-${number}.${Ext}</Object>
<SpriteObject>abc/${RunId}/sprite-${number}.${Ext}</SpriteObject>
</Output>
</Operation>
</Snapshot_1581665960536>
<Transcode_1581665960538>
<Type>Transcode</Type>
<Operation>
<TemplateId>t16e81a29fe48c4e23acefc247a7792b63</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>bcd/${RunId}/trans.{Ext}</Object>
</Output>
</Operation>
</Transcode_1581665960538>
<Segment_15816659605667>
<Type>Segment</Type>
<Operation>
<Segment>
<Format>mkv</Format>
<Duration>20</Duration>
</Segment>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>test-trans${Number}.{Ext}</Object>
</Output>
</Operation>
</Segment_15816659605667>
<SmartCover_1581665960539>
<Type>SmartCover</Type>
<Operation>
<TemplateId>t16e81a29fe48c4e23acefc247a7792b63</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>abc/${RunId}/cover-${Number}.{Ext}</Object>
</Output>
</Operation>
</SmartCover_1581665960539>
<PicProcess_15816659605668>
<Type>PicProcess</Type>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>bcd/${RunId}/pic.{Ext}</Object>
</Output>
</Operation>
</PicProcess_15816659605668>
</Nodes>
</Topology>
</MediaWorkflow>
</Request>
POST /workflow HTTP/1.1
Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=************************************************
Content-Length: 166
Content-Type: application/xml

<Request>
<MediaWorkflow>
<Name>workflow-1</Name>
<State>Active</State>
<Topology>
<Dependencies>
<Start>Snapshot_1581665960536,Transcode_1581665960538</Start>
<Snapshot_1581665960536>End</Snapshot_1581665960536>
<Transcode_1581665960538>Segment_15816659605667,SmartCover_1581665960539</Transcode_1581665960538>
<Segment_15816659605667>End</Segment_15816659605667>
<SmartCover_1581665960539>PicProcess_15816659605668</SmartCover_1581665960539>
<PicProcess_15816659605668>End</PicProcess_15816659605668>
</Dependencies>
<Nodes>
<Start>
<Type>Start</Type>
<Input>
<ObjectPrefix>input/workflow-1</ObjectPrefix>
<NotifyConfig>
<State>On</State>
<Url>http://www.callback.com</Url>
<Event>TaskFinish,WorkflowFinish</Event>
<Type>Url</Type>
<ResultFormat>JSON</ResultFormat>
</NotifyConfig>
<ExtFilter>
<State>On</State>
<Video>true</Video>
<Audio>false</Audio>
<Image>false</Image>
<Custom>false</Custom>
<AllFile>false</AllFile>
</ExtFilter>
</Input>
</Start>
<Snapshot_1581665960536>
<Type>Snapshot</Type>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>abc/${RunId}/snapshot-${number}.${Ext}</Object>
<SpriteObject>abc/${RunId}/sprite-${number}.${Ext}</SpriteObject>
</Output>
</Operation>
</Snapshot_1581665960536>
<Transcode_1581665960538>
<Type>Transcode</Type>
<Operation>
<TemplateId>t16e81a29fe48c4e23acefc247a7792b63</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>bcd/${RunId}/trans.{Ext}</Object>
</Output>
</Operation>
</Transcode_1581665960538>
<Segment_15816659605667>
<Type>Segment</Type>
<Operation>
<Segment>
<Format>mkv</Format>
<Duration>20</Duration>
</Segment>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>test-trans${Number}.{Ext}</Object>
</Output>
</Operation>
</Segment_15816659605667>
<SmartCover_1581665960539>
<Type>SmartCover</Type>
<Operation>
<TemplateId>t16e81a29fe48c4e23acefc247a7792b63</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>abc/${RunId}/cover-${Number}.{Ext}</Object>
</Output>
</Operation>
</SmartCover_1581665960539>
<PicProcess_15816659605668>
<Type>PicProcess</Type>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>bcd/${RunId}/pic.{Ext}</Object>
</Output>
</Operation>
</PicProcess_15816659605668>
</Nodes>
</Topology>
</MediaWorkflow>
</Request>
adaptive bitrate
POST /workflow HTTP/1.1
Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=************************************************
Host: test-1234567890.ci.ap-chongqing.myqcloud.com
Content-Length: 166
Content-Type: application/xml

<Request>
<MediaWorkflow>
<Name>workflow-2</Name>
<State>Active</State>
<Topology>
<Dependencies>
<Start>StreamPackConfig_1581665960532</Start>
<StreamPackConfig_1581665960532>VideoStream_1581665960536,VideoStream_1581665960537</StreamPackConfig_1581665960532>
<VideoStream_1581665960536>StreamPack_1581665960538</VideoStream_1581665960536>
<VideoStream_1581665960537>StreamPack_1581665960538</VideoStream_1581665960537>
<StreamPack_1581665960538>End</StreamPack_1581665960538>
</Dependencies>
<Nodes>
<Start>
<Type>Start</Type>
<Input>
<ObjectPrefix>input/workflow-2</ObjectPrefix>
<NotifyConfig>
<State>On</State>
<Url>http://www.callback.com</Url>
<Event>TaskFinish,WorkflowFinish</Event>
<Type>Url</Type>
<ResultFormat>JSON</ResultFormat>
</NotifyConfig>
<ExtFilter>
<State>On</State>
<Video>true</Video>
<Audio>false</Audio>
<Image>false</Image>
<Custom>false</Custom>
<AllFile>false</AllFile>
</ExtFilter>
</Input>
</Start>
<StreamPackConfig_1581665960532>
<Type>StreamPackConfig</Type>
<Operation>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>${InputPath}/${InputName}._${RunId}.${ext}</Object>
</Output>
<StreamPackConfig>
<PackType>HLS</PackType>
<IgnoreFailedStream>true</IgnoreFailedStream>
</StreamPackConfig>
</Operation>
</StreamPackConfig_1581665960532>
<VideoStream_1581665960536>
<Type>VideoStream</Type>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>${RunId}_Substream_1/video.m3u8</Object>
</Output>
</Operation>
</VideoStream_1581665960536>
<VideoStream_1581665960537>
<Type>VideoStream</Type>
<Operation>
<TemplateId>t1460606bgfdg2148c4ab182f55163ba7bj</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>${RunId}_Substream_2/video.m3u8</Object>
</Output>
</Operation>
</VideoStream_1581665960537>
<StreamPack_1581665960538>
<Type>StreamPack</Type>
<Operation>
<StreamPackInfo>
<VideoStreamConfig>
<VideoStreamName>VideoStream_1581665960536</VideoStreamName>
<BandWidth>200000000</BandWidth>
</VideoStreamConfig>
<VideoStreamConfig>
<VideoStreamName>VideoStream_1581665960537</VideoStreamName>
<BandWidth>200000000</BandWidth>
</VideoStreamConfig>
</StreamPackInfo>
</Operation>
</StreamPack_1581665960538>
</Nodes>
</Topology>
</MediaWorkflow>
</Request>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 230
Connection: keep-alive
Date: Thu, 14 Jul 2022 12:37:29 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf95s=

<Response>
<RequestId>NTk0MjdmODlfMjQ4OGY3XzYzYzhf95s=</RequestId>
<MediaWorkflow>
<Name>workflow-2</Name>
<State>Active</State>
<WorkflowId>w93aa43ba105347169fa093ed857b2a90</WorkflowId>
<BucketId>test-1234567890</BucketId>
<CreateTime>2022-07-14T12:37:28+0800</CreateTime>
<UpdateTime>2022-07-14T12:37:28+0800</UpdateTime>
<Topology>
<Dependencies>
<Start>StreamPackConfig_1581665960532</Start>
<StreamPackConfig_1581665960532>VideoStream_1581665960536,VideoStream_1581665960537</StreamPackConfig_1581665960532>
<VideoStream_1581665960536>StreamPack_1581665960538</VideoStream_1581665960536>
<VideoStream_1581665960537>StreamPack_1581665960538</VideoStream_1581665960537>
<StreamPack_1581665960538>End</StreamPack_1581665960538>
</Dependencies>
<Nodes>
<Start>
<Type>Start</Type>
<Input>
<QueueId>p09d709939fef48a0a5c247ef39d90cec</QueueId>
<ObjectPrefix>input/workflow-2</ObjectPrefix>
<NotifyConfig>
<State>On</State>
<Url>http://www.callback.com</Url>
<Event>TaskFinish,WorkflowFinish</Event>
<Type>Url</Type>
<ResultFormat>JSON</ResultFormat>
</NotifyConfig>
<ExtFilter>
<State>On</State>
<Video>true</Video>
<Audio>false</Audio>
<Image>false</Image>
<Custom>false</Custom>
<AllFile>false</AllFile>
</ExtFilter>
</Input>
</Start>
<StreamPackConfig_1581665960532>
<Type>StreamPackConfig</Type>
<Operation>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>${InputPath}/${InputName}._${RunId}.${ext}</Object>
</Output>
<StreamPackConfig>
<PackType>HLS</PackType>
<IgnoreFailedStream>true</IgnoreFailedStream>
</StreamPackConfig>
</Operation>
</StreamPackConfig_1581665960532>
<VideoStream_1581665960536>
<Type>VideoStream</Type>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>${RunId}_Substream_1/video.m3u8</Object>
</Output>
</Operation>
</VideoStream_1581665960536>
<VideoStream_1581665960537>
<Type>VideoStream</Type>
<Operation>
<TemplateId>t1460606bgfdg2148c4ab182f55163ba7bj</TemplateId>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-1234567890</Bucket>
<Object>${RunId}_Substream_2/video.m3u8</Object>
</Output>
</Operation>
</VideoStream_1581665960537>
<StreamPack_1581665960538>
<Type>StreamPack</Type>
<Operation>
<StreamPackInfo>
<VideoStreamConfig>
<VideoStreamName>VideoStream_1581665960536</VideoStreamName>
<BandWidth>200000000</BandWidth>
</VideoStreamConfig>
<VideoStreamConfig>
<VideoStreamName>VideoStream_1581665960537</VideoStreamName>
<BandWidth>200000000</BandWidth>
</VideoStreamConfig>
</StreamPackInfo>
</Operation>
</StreamPack_1581665960538>
</Nodes>
</Topology>
</MediaWorkflow>
</Response>
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback