GeneralAnalyzeImage

Updated at:

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.

Debug

RAM authorization

No authorization information is currently available for this API.

Request syntax

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

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringNo

Workspace ID.

llm-ik******RVYCKzt
appIdstringNo

Application ID.

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

Request body.

streambooleanNo

Required. Whether to stream: true to return the answer in a streaming manner; false to return the full answer.

true
imageUrlsarrayYes

List of image URLs

stringNo

List of image URLs

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

Custom instruction

Analyze the content in the image
templateIdsarrayNo

Template ID. If both the template ID and customPrompt are present, the template ID takes precedence

longYes

Template ID. If both the template ID and the instruction task type are present, the template ID takes precedence

34

Response elements

NameTypeDescriptionExample value
object

Schema of Response

requestIdstring

Id of the request

2D718325-92F9-5588-803B-C4A69A5F0AE1
successboolean

Indicates whether the request succeeded.

True
textstring

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

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
inputTokensinteger

Number of input tokens

1000
outputTokensinteger

Number of output tokens

2000
totalTokensinteger

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 codeError codeError messageDescription
400CCAI.InvalidParam.NotExistThe specified parameter %s is not valid.The request API parameter does not exist.
400CCAI.ParamInvalid.IllegalParamValueThe parameter value of the request API is illegal %s.The request API parameter value 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 triggered. For paid APIs, purchase a higher QPM. For free APIs with special requirements, 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 triggered. For paid APIs, purchase a higher QPS. For free APIs with special requirements, contact us through the DingTalk group (62730018475).
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 permission on the specified business space. Grant business space permissions as needed.
403CCAI.IllegalPermission.NoAuthUser not authorized to operate on the specified resource.The user is not authorized to operate on the specified resource.
500CCAI.InternalErrorThe 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.