AnalyzeImage
Use the Tongyi Xiaomi CCAI Conversation Analysis AIO application to analyze image content, including watermark detection. Call this API using HTTP to obtain responses for your customers.
Operation description
Before you use this API, make sure that you fully understand the billing methods and pricing of the Tongyi Xiaomi CCAI Conversation Analysis AIO service.
Prerequisites
- The Tongyi Xiaomi CCAI Conversation Analysis AIO service is enabled.
- An application is created: create a Tongyi Xiaomi CCAI Conversation Analysis AIO application in the Application Center and obtain the APP-ID and WORKSPACE-ID.
Try it now
You can run this API directly in OpenAPI Explorer, which saves you the trouble of calculating signatures. After the operation succeeds, OpenAPI Explorer can automatically generate SDK code examples.
RAM authorization
No authorization information is currently available for this API.
Request syntax
POST /{workspaceId}/ccai/app/{appId}/analyzeImage HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| workspaceId | string | No | Workspace ID. | llm-ik******RVYCKzt |
| appId | string | No | Application ID. | a070a49c681f4a95a0f0*********35c |
| body | object | No | Request body. | |
| stream | boolean | Yes | Required. Whether to stream: true returns the answer in streaming mode; false returns the full answer at once. | false |
| imageUrls | array | No | List of image URLs. | |
| string | No | List of image URLs. | https://img.123.com/1.jppg | |
| resultTypes | array | No | List of task types. | |
| string | No | watermark: image watermark analysis. | watermark |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| requestId | string | Request ID. | 9*****-AE0D-5EE3-B1AF-48632CB0831C |
| success | boolean | Indicates whether the request succeeded. | True |
| text | string | The result returned by the application. | [{\"num\":\"1\",\"isHit\":\"false\",\"remarks\":\"无水印\"}] |
| finishReason | string | If streaming output is used, this field is null while the response is being generated. When generation ends, this field is stop if generation stopped due to a stop token. | stop |
| inputTokens | string | Number of input tokens. | 1000 |
| outputTokens | string | Number of output tokens. | 2000 |
| totalTokens | string | Total number of tokens. | 3000 |
Examples
Success response
JSON format
{
"requestId": "9*****-AE0D-5EE3-B1AF-48632CB0831C",
"success": true,
"text": "[{\\\"num\\\":\\\"1\\\",\\\"isHit\\\":\\\"false\\\",\\\"remarks\\\":\\\"无水印\\\"}]",
"finishReason": "stop",
"inputTokens": 1000,
"outputTokens": 2000,
"totalTokens": 3000
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | CCAI.InvalidParam.NotExist | The specified parameter %s is not valid. | The request parameter does not exist. |
| 400 | CCAI.ParamInvalid.IllegalParamValue | The parameter value of the request API is illegal %s. | The request parameter is invalid. |
| 400 | CCAI.Throttling.Qpm | Trigger QPM flow restriction. Please purchase higher QPM for paid API. If free API has special requirements, please contact us through DingTalk group (62730018475). | QPM throttling is triggered. For paid APIs, purchase a higher QPM. If you have special requirements for free APIs, contact us through the DingTalk group (62730018475). |
| 400 | CCAI.Throttling.Qps | Trigger current QPS limit, pay API please buy higher QPS, the free API if you have special requirements, please contact us through the DingTalk group (62730018475). | Throttling is triggered. For paid APIs, purchase a higher QPS. If you have special requirements for free APIs, contact us through the DingTalk group (62730018475). |
| 403 | CCAI.IllegalPermission.NoAuth | User not authorized to operate on the specified resource. | The user is not authorized to operate the specified resource. |
| 403 | CCAI.ParamNotfound.MissParam | Parameter verification failed, The specified parameter %s is missing. | Parameter validation failed. The specified parameter is missing. |
| 403 | CCAI.TenantPermission.NoAuth | The current account does not have the permission to specify the business space. Please authorize the business space permission. | The current account does not have the permission to specify the business space. Grant the business space permission. |
| 500 | CCAI.InternalError | The request processing has failed due to some unknown error, exception or failure. | Internal system error. Try again later. |
For more error codes, visit the Error Center.