Submits a smart production job.

Usage notes

Jobs submitted by calling this operation run in an asynchronous manner. After a job is added to the ApsaraVideo Media Processing (MPS) queue, it is scheduled to run. You can call the QueryIProductionJob operation or configure a callback to query the job result.

Limits on QPS

You can call this operation up to 100 times per second. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SubmitIProductionJob

The operation that you want to perform. Set the value to SubmitIProductionJob.

FunctionName String Yes ImageCartoonize

The name of the algorithm that you want to use for the job. Valid values:

  • VideoH2V: This algorithm transforms a video from the landscape mode to the portrait mode.
  • VideoDelogo: This algorithm removes logos from a video.
  • Cover: This algorithm intelligently generates a cover image for a video.
  • VideoClip: This algorithm intelligently generates a summary for a video.
  • ImageMatting: This algorithm cutouts a figure from an image.
  • ImageH2V: This algorithm transforms an image from the landscape mode to the portrait mode.
  • ImageDelogo: This algorithm removes logos from an image.
  • CaptionExtraction: This algorithm extracts caption from a video and generates the subtitle file. You need to specify the URL of the video to be processed.
  • VideoDetext: This algorithm removes caption from a video.
  • VideoGreenScreenMatting: This algorithm performs green-screen image matting on a video and generates a new video. You need to specify the URL of the video to be processed and the URL of the image used to replace the original background.
  • MusicSegmentDetect: This algorithm detects the chorus of a song. After you specify the URL of the video or audio to be processed, the start time and end time of each chorus are returned. If no chorus exists, the returned parameter is empty.
  • AudioMixing: This algorithm mixes audio streams.
  • VideoSplit :This algorithm segments a PPT video into multiple video clips.
  • AudioBeatDetection: This algorithm detects rhythms. After you specify the URL of the video or audio to be processed, the BeatList and DownBeatList parameters are returned.
  • ASR: This algorithm performs automatic speech recognition.
  • AsyncTextToSpeech: This algorithm converts text to speech in an asynchronous manner.
  • TextToSpeech: This algorithm converts text to speech.
  • ImageCartoonize :This algorithm converts a two-dimensional media file to a three-dimensional one and stylizes facial images. To use the stylizing feature, contact yuanzhigao1209 on DingTalk.
ModelId String No null

The ID of the algorithm model. We recommend that you do not specify this parameter. In this case, the default model corresponding to the specified algorithm is used.

JobParams String Yes null

The algorithm-specific parameters required for submitting the smart production job. The parameters are specified as JSON objects and differ based on the specified algorithm. For more information, see Algorithm-specific parameters for a smart production job.

ScheduleParams String No null

The parameters required to configure job scheduling. We recommend that you leave the ScheduleParams parameter empty.

NotifyUrl String No mns://125340688170****.oss-cn-shanghai.aliyuncs.com/queues/example-pipeline

The callback URL. Only URLs of Message Service (MNS) queues are supported. To view the URL, you can log on to the MNS console, click Queues in the left-side navigation pane, find the MNS queue whose URL you want to obtain, and then click Details in the Actions column.

UserData String No null

The user business data that will be returned to the callback URL. We recommend that you leave this parameter empty.

PipelineId String Yes 39f8e0bc005e4f309379701645f4****

The ID of the MPS queue to which you want to submit the smart production job. To view the ID, you can log on to the MPS console and choose Global Settings > Pipelines in the left-side navigation pane. You can bind an MNS queue to the MPS queue for receiving callbacks of the smart production job. Smart production jobs of different tenants can be submitted to different MPS queues to implement multi-tenant data isolation. If you do not specify this parameter, the smart production job is submitted to the default MPS queue. By default, an MPS queue can process a maximum of 10 concurrent smart production jobs. No MNS topic is bound to the MPS queue.

Input String No oss://example-****.oss-cn-shanghai.aliyuncs.com/example.mp4

The URL of the input file. Only Object Storage Service (OSS) URLs are supported. To obtain the URL, you can log on to the MPS console and choose Media Management > Media List in the left-side navigation pane. Alternatively, you can view the URL in the OSS console.

Output String No oss://example-****.oss-cn-shanghai.aliyuncs.com/iproduction/{source}-{timestamp}-{sequenceId}.srt

The URL of the output file. Only OSS URLs are supported. To obtain the URL, you can log on to the MPS console and choose Media Management > Media List in the left-side navigation pane. Alternatively, you can view the URL in the OSS console.

Note The URL must be in the format of oss://example-****.oss-cn-shanghai.aliyuncs.com/iproduction/{source}-{timestamp}-{sequenceId}.srt. The {source}, {timestamp}, and {sequenceId} fields are placeholders. You can replace the placeholders respectively with a file name, a UNIX timestamp, and a sequence number. The placeholders are not required. However, for algorithms that may return more than one result, such as smart cover, the {sequenceId} field is required to avoid duplicate output URLs. You can customize the file name extension.

Response parameters

Parameter Type Example Description
RequestId String 5210DBB0-E327-4D45-ADBC-0B83C8796E26

The ID of the request.

JobId String 39f8e0bc005e4f309379701645f4****

The ID of the job. We recommend that you keep this ID for subsequent operation calls.

Result String null

The return results. The return results vary based on the algorithm. For more information, see Algorithm-specific parameters for a smart production job.

Examples

Sample requests

http(s)://mts.cn-shanghai.aliyuncs.com/?Action=SubmitIProductionJob
&FunctionName=ImageCartoonize
&ModelId=null
&JobParams={mode:"gif"}
&ScheduleParams=null
&NotifyUrl=mns://125340688170****.oss-cn-shanghai.aliyuncs.com/queues/example-pipeline
&UserData=null
&PipelineId=39f8e0bc005e4f309379701645f4****
&Input=oss://example-****.oss-cn-shanghai.aliyuncs.com/example.mp4
&Output=oss://example-****.oss-cn-shanghai.aliyuncs.com/iproduction/{source}-{timestamp}-{sequenceId}.srt
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<SubmitIProductionJobResponse>
    <RequestId>5210DBB0-E327-4D45-ADBC-0B83C8796E26</RequestId>
    <JobId>39f8e0bc005e4f309379701645f4****</JobId>
    <Result>{ "Code":"Success", "Details":[], "FunctionName":"ImageCartoonize", "JobId":"39f8e0bc005e4f309379701645f4****", "Message":"success", "State":"Success", "Type":"IProduction" }</Result>
</SubmitIProductionJobResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "5210DBB0-E327-4D45-ADBC-0B83C8796E26",
  "JobId" : "39f8e0bc005e4f309379701645f4****",
  "Result" : "{ \"Code\":\"Success\", \"Details\":[], \"FunctionName\":\"ImageCartoonize\", \"JobId\":\"39f8e0bc005e4f309379701645f4****\", \"Message\":\"success\", \"State\":\"Success\", \"Type\":\"IProduction\" }"
}

Error codes

For a list of error codes, visit the API Error Center.