GeneralAnalyzeImage
Performs general image analysis.
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}/generalanalyzeImage 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 | No | Required. Whether to stream: true to return the answer in a streaming manner; false to return the full answer. | true |
| imageUrls | array | Yes | List of image URLs | |
| string | No | List of image URLs | https://img.123.com/1.jppg | |
| customPrompt | string | No | Custom instruction | Analyze the content in the image |
| templateIds | array | No | Template ID. If both the template ID and customPrompt are present, the template ID takes precedence | |
| long | Yes | Template ID. If both the template ID and the instruction task type are present, the template ID takes precedence | 34 |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| requestId | string | Id of the request | 2D718325-92F9-5588-803B-C4A69A5F0AE1 |
| success | boolean | Indicates whether the request succeeded. | True |
| text | string | The result returned by the application. | There is no recognizable text in this image, so OCR (optical character recognition) cannot be performed. Let me know if you have any other questions or requests. |
| finishReason | string | For streaming output, this field is null while the response is being generated. If generation ends due to a stop token, the value is stop. | stop |
| inputTokens | integer | Number of input tokens | 1000 |
| outputTokens | integer | Number of output tokens | 2000 |
| totalTokens | integer | Total number of tokens | 3000 |
Examples
Success response
JSON format
{
"requestId": "2D718325-92F9-5588-803B-C4A69A5F0AE1",
"success": true,
"text": "There is no recognizable text in this image, so OCR (optical character recognition) cannot be performed. Let me know if you have any other questions or requests.",
"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 API parameter does not exist. |
| 400 | CCAI.ParamInvalid.IllegalParamValue | The parameter value of the request API is illegal %s. | The request API parameter value 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 triggered. For paid APIs, purchase a higher QPM. For free APIs with special requirements, 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 triggered. For paid APIs, purchase a higher QPS. For free APIs with special requirements, contact us through the DingTalk group (62730018475). |
| 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 permission on the specified business space. Grant business space permissions as needed. |
| 403 | CCAI.IllegalPermission.NoAuth | User not authorized to operate on the specified resource. | The user is not authorized to operate on the specified resource. |
| 500 | CCAI.InternalError | The request processing has failed due to some unknown error, exception or failure. | Internal server error. Try again later. |
Visit the Error Center to view more error codes.