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
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:
|
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.