Use the SubmitIProductionJob operation to submit an intelligent production job.
Operation description
This is an asynchronous API. When you submit a task, the API returns a task ID and queues the task for asynchronous processing. The final result is delivered via a callback. You can also query the task status by calling QuerySmartProductionTask.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:SubmitIProductionJob |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
No |
The name of the job, which can be up to 100 characters long. |
测试任务 |
| FunctionName |
string |
Yes |
The name of the algorithm function. Valid values:
|
Cover |
| Input |
object |
Yes |
The input media asset. You can specify an OSS file or a media asset ID. The requirements for input files vary by algorithm function. For more information, see the supplementary instructions. |
|
| Type |
string |
Yes |
The type of input media. Valid values:
|
OSS |
| Media |
string |
Yes |
The OSS URL of the input file or the ID of the input media asset. The OSS URL can be in one of the following formats:
|
oss://bucket/object |
| Output |
object |
Yes |
The output destination. You can specify an OSS file path or a media asset ID. The output files vary by algorithm function. For more information, see the supplementary instructions. |
|
| Type |
string |
Yes |
The type of the output media. Valid values:
|
OSS |
| Biz |
string |
No |
The service to which the media asset belongs. |
IMS |
| Media |
string |
Yes |
The output destination. If The OSS URL can be in one of the following formats:
Media asset ID:
Note
The OSS file path supports placeholders. For example:
|
oss://bucket/object |
| OutputUrl |
string |
No |
If |
http(s)://bucket.oss-[RegionId].aliyuncs.com/object |
| TemplateId |
string |
No |
The ID of the template. |
****20b48fb04483915d4f2cd8ac**** |
| JobParams |
string |
No |
The algorithm job parameters, specified as a JSON-formatted string. The content of the JSON object varies by algorithm function. For more information, see the supplementary instructions. |
{"Model":"gif"} |
| ScheduleConfig |
object |
No |
The configuration for job scheduling. |
|
| PipelineId |
string |
No |
The ID of the pipeline. |
5246b8d12a62433ab77845074039c3dc |
| Priority |
integer |
No |
The job priority, which can be an integer from 1 to 10. A smaller value indicates a higher priority. |
6 |
| UserData |
string |
No |
Custom user data. The system passes this data through and returns it as-is in the callback or response. The length cannot exceed 256 characters. |
{"test":1} |
| ModelId |
string |
No |
The ID of the algorithm model. If you do not specify this parameter, the system uses the default model for the selected function. We recommend leaving this parameter empty unless you need to use a specific alternative model. The following function offers an alternative model:
|
Input and output fields
Cover
Accepts a video file as input and outputs multiple images (three by default). You must use a placeholder to distinguish the output files. The output format is either PNG for a static image or GIF for an animated image, depending on the parameters specified in JobParams.
VideoDelogo
Removes logos from a video file and outputs an MP4 video.
VideoDetext
Removes subtitles from a video file and outputs an MP4 video.
CaptionExtraction
Extracts subtitles from a video file and outputs them as an SRT file.
VideoGreenScreenMatting
Takes a video file as input and outputs a video with the green screen background removed. The output format is either MP4 or WebM, depending on the parameters in JobParams.
FaceBeauty
Takes a video file as input and outputs a video in MP4 format with face beautification effects.
VideoH2V
Takes a video file as input and outputs a vertical MP4 video converted from a horizontal source.
MusicSegmentDetect
Takes an audio file as input and outputs a JSON file containing chorus detection results.
AudioBeatDetection
Takes an audio file as input and outputs a JSON file containing beat detection results.
AudioQualityAssessment
Takes an audio file as input. No output file is generated. The audio quality assessment results are returned directly in the QueryIProductionJob response.
SpeechDenoise
Reduces noise in an audio file and outputs the result as a WAV file.
AudioMixing
Mixes the input audio file with additional tracks specified in JobParams and outputs the result in WAV format.
MusicDemix
Separates an audio file (song) into two separate audio files: one for the vocal and one for the accompaniment. The Output path must include the {resultType} placeholder to distinguish between the two files.
JobParams JSON fields
Cover
Model: String. Specifies the Smart Cover model. If left empty, a static image is generated. If set togif, an animated image is generated.
VideoDelogo
LogoModel: String. Specifies the type of logo to remove. Valid values:tv(television broadcast logos) andinternet(online media logos). You can specify multiple values, separated by commas.Boxes: String. The coordinates of the bounding boxes for the target logos. Coordinates are specified as normalized distances from the upper-left corner in the format[xmin, ymin, width, height]. A maximum of two bounding boxes are supported. Example:"[[0, 0, 0.3, 0.3], [0.7, 0, 0.3, 0.3]]".
VideoDetext
LimitRegion: List. Specifies the regions for subtitle detection. Coordinates are specified as normalized distances from the upper-left corner in the format[xmin, ymin, width, height]. Multiple regions are supported. Example:[[0, 0, 0.3, 0.3], [0.7, 0, 0.3, 0.3]]. Note: If this parameter is omitted, the service defaults to scanning the bottom 30% of the video.Time: List. Specifies the time ranges for subtitle removal in seconds, in the format[start_time, end_time]. For example,[5, 20]indicates that subtitles are removed only between 5 and 20 seconds into the video.A one-dimensional array, such as
[5, 20], to specify a single time range.A two-dimensional array, such as
[[5, 20], [25, 43], [51, 80]], to specify multiple time ranges. This format is supported only whenmodelIdisalgo-video-detext-new.
CaptionExtraction
fps: Integer. (Optional) The sampling frame rate. Valid range:[2, 10]. Default:5.roi: The region of interest (ROI) for subtitle extraction. Only subtitles within this region are extracted. The format is[[top, bottom], [left, right]], using normalized values. For example,[[0.5, 1], [0, 1]]specifies the bottom half of the video. If this parameter is omitted, the service defaults to extracting subtitles from the bottom quarter of the video.lang: String. The language for recognition. Valid values:ch(Chinese),en(English), andch_ml(mixed Chinese and English). Default:ch.track: String. If set tomain, only the main subtitle track is extracted. If this parameter is omitted, all subtitles within the specified region are extracted by default.
VideoGreenScreenMatting
bgimage: String. The URL of the background image to overlay on the video after matting. Example:http://example-image-****.example-location.aliyuncs.com/example/example.jpg. If this parameter is omitted, the service outputs a WebM video with an alpha channel.
FaceBeauty
beauty_params: String. The parameters for the face beautification feature. Example:"whiten=20,smooth=50,face_thin=50". For more information, see Parameter Field Descriptions.
VideoH2V
None
MusicSegmentDetect
None
AudioBeatDetection
None
AudioQualityAssessment
None
SpeechDenoise
The input audio file must be in WAV format with a sampling rate of 16 kHz or 48 kHz.
AudioMixing
inputs: A list containing the audio tracks to mix. Note: Currently, only one file is supported. Example:{"file":"http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/2.mp4"}
MusicDemix
None
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned. |
||
| RequestId |
string |
The ID of the request. |
C1849434-FC47-5DC1-92B6-F7EAAFE3851E |
| JobId |
string |
The ID of the job. |
****20b48fb04483915d4f2cd8ac**** |
Examples
Success response
JSON format
{
"RequestId": "C1849434-FC47-5DC1-92B6-F7EAAFE3851E",
"JobId": "****20b48fb04483915d4f2cd8ac****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.