CreateMultiModalTask
Performs a synchronous multimodal evaluation on a single image or audio/video file and directly returns the score.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
agentloop:CreateMultiModalTask |
create |
*Workspace
|
None | None |
Request syntax
POST /api/v1/media-processings HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The multimodal evaluation request body. Specifies the workspace, evaluator, and input parameters. When using the national subsidy image inspection, specify an image URL accessible to the evaluator in args.imageUrl. |
{"agentSpace":"example-space","evaluatorRef":"Builtin.subsidy_api","args":{"imageUrl":"https://example-bucket.oss-cn-hangzhou.aliyuncs.com/label.jpg"}} |
| agentSpace |
string |
Yes |
The AgentSpace name. It must be 3 to 63 characters in length and can contain only lowercase letters, digits, and hyphens. It must start and end with a letter or a digit. |
example-space |
| evaluatorRef |
string |
Yes |
The name of the evaluator registered as a public API. If the evaluator is not registered, not exposed as a public API, or the current version is invalid, a 400 error is returned. |
Builtin.subsidy_api |
| prompt |
string |
No |
The evaluation prompt. If omitted, it is processed as an empty string. The maximum length is 2,000 characters, counted by Unicode code points. |
Verify whether the image is complete |
| taskName |
string |
No |
The task name, used to group multiple calls of the same business line in the console. If omitted or empty, agentloop-media-process is used. The maximum length is 128 characters. Control characters are not allowed. |
agentloop-media-process |
| ossRegion |
string |
No |
The signature region when the media is stored in OSS or SLS, such as cn-hangzhou. This parameter is used only when the region cannot be determined from the URL itself. |
cn-hangzhou |
| arn |
string |
No |
The ARN of the role used to access OSS or SLS, such as acs:ram:: |
acs:ram::1234567890123456:role/media-reader |
| args |
object |
Yes |
The input parameters for the evaluator. The keys are defined by the evaluator specified by evaluatorRef. Example for national subsidy image inspection: {"imageUrl":"https://example.com/label.jpg"}. |
{"imageUrl":"https://example-bucket.oss-cn-hangzhou.aliyuncs.com/label.jpg"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
{"score":1,"msg":"The image is complete and the inspection is passed.","taskName":"agentloop-media-process","taskId":"eval-task-0123456789abcdef0123456789abcdef"} |
|
| score |
number |
The score, ranging from 0 to 1. It is null when the evaluation fails. If the backend returns a percentage score greater than 1, it is converted to score/100 and rounded to a maximum of 4 decimal places. |
1 |
| msg |
string |
The evaluation message. It is the description returned by the backend upon success, or the customer-visible error message upon failure. |
The image is complete and the inspection is passed |
| taskName |
string |
The task name used for this call. It is also returned upon failure if the request body has been parsed. |
agentloop-media-process |
| taskId |
string |
The task ID, in the format of eval-task-<32hex>. It can be used for tracing in the console or query API. It is null if the failure occurs before the task is created. |
eval-task-0123456789abcdef0123456789abcdef |
Examples
Success response
JSON format
{
"score": 1,
"msg": "The image is complete and the inspection is passed",
"taskName": "agentloop-media-process",
"taskId": "eval-task-0123456789abcdef0123456789abcdef"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.