AnalyzeImage

Updated at:

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

  1. The Tongyi Xiaomi CCAI Conversation Analysis AIO service is enabled.
  2. 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.

Debug

RAM authorization

No authorization information is currently available for this API.

Request syntax

POST /{workspaceId}/ccai/app/{appId}/analyzeImage HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringNo

Workspace ID.

llm-ik******RVYCKzt
appIdstringNo

Application ID.

a070a49c681f4a95a0f0*********35c
bodyobjectNo

Request body.

streambooleanYes

Required. Whether to stream: true returns the answer in streaming mode; false returns the full answer at once.

false
imageUrlsarrayNo

List of image URLs.

stringNo

List of image URLs.

https://img.123.com/1.jppg
resultTypesarrayNo

List of task types.

stringNo

watermark: image watermark analysis.

watermark

Response elements

NameTypeDescriptionExample value
object

Schema of Response

requestIdstring

Request ID.

9*****-AE0D-5EE3-B1AF-48632CB0831C
successboolean

Indicates whether the request succeeded.

True
textstring

The result returned by the application.

[{\"num\":\"1\",\"isHit\":\"false\",\"remarks\":\"无水印\"}]
finishReasonstring

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
inputTokensstring

Number of input tokens.

1000
outputTokensstring

Number of output tokens.

2000
totalTokensstring

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 codeError codeError messageDescription
400CCAI.InvalidParam.NotExistThe specified parameter %s is not valid.The request parameter does not exist.
400CCAI.ParamInvalid.IllegalParamValueThe parameter value of the request API is illegal %s.The request parameter is invalid.
400CCAI.Throttling.QpmTrigger 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).
400CCAI.Throttling.QpsTrigger 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).
403CCAI.IllegalPermission.NoAuthUser not authorized to operate on the specified resource.The user is not authorized to operate the specified resource.
403CCAI.ParamNotfound.MissParamParameter verification failed, The specified parameter %s is missing.Parameter validation failed. The specified parameter is missing.
403CCAI.TenantPermission.NoAuthThe 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.
500CCAI.InternalErrorThe 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.