For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content
Image AnalyzerAnalyze Image
TestMu AI
StatusCommunityBlog
Image Analyzer

Analyze Image

Analyze an image and validate it against the original prompt. This endpoint: 1. Accepts an image (uploaded file or URL) and the prompt used to generate it 2. Uses AI to analyze the image and compare it against the prompt 3. Returns detailed analysis including matches and discrepancies Provide an uploaded image file or an image_url (the uploaded file takes precedence if both are sent).

POST
/api/analyze-image
Analyze Image
curl --request POST \
--url "https://agent-testing.lambdatest.com/api/analyze-image" \
--header "Authorization: Basic <encoded-value>" \
--header "Content-Type: multipart/form-data" \
--form 'project_id=<project_id>' \
--form 'original_prompt=<original_prompt>' \
--form 'image=<image>' \
--form 'image_url=<image_url>'
{
"data": {
"analysis": "The image shows a red vintage bicycle leaning against a weathered brick wall in warm afternoon light.",
"analysis_id": "c9d18f4b-6e27-4a51-b3d0-8f2a415e9c76",
"created_at": "2026-07-14T09:32:11.482910",
"detailed_observations": "Composition centers the bicycle; lighting is warm and natural; no text artifacts detected.",
"discrepancies": [
"Prompt requested a wicker basket; none is visible"
],
"image_name": "bike.png",
"image_storage_url": "https://storage.example.com/org-42/project-7/bike.png?expires=7200&signature=...",
"matches": [
"Red vintage bicycle is present",
"Brick wall background as requested"
],
"overall_assessment": "The image closely matches the prompt with one minor omission."
},
"message": "Image analysis completed successfully",
"success": true
}

Authorizations

Authorizationstringheaderrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

multipart/form-data
project_idstringrequired
original_promptstringrequired
imagestring<binary>
image_urlstring

Response

application/json

Successful Response

successbooleanrequired

Whether the analysis was successful

messagestringrequired

Status message

dataobject

Analysis results

errorstring

Error message if analysis failed

Analyze Image
curl --request POST \
--url "https://agent-testing.lambdatest.com/api/analyze-image" \
--header "Authorization: Basic <encoded-value>" \
--header "Content-Type: multipart/form-data" \
--form 'project_id=<project_id>' \
--form 'original_prompt=<original_prompt>' \
--form 'image=<image>' \
--form 'image_url=<image_url>'
{
"data": {
"analysis": "The image shows a red vintage bicycle leaning against a weathered brick wall in warm afternoon light.",
"analysis_id": "c9d18f4b-6e27-4a51-b3d0-8f2a415e9c76",
"created_at": "2026-07-14T09:32:11.482910",
"detailed_observations": "Composition centers the bicycle; lighting is warm and natural; no text artifacts detected.",
"discrepancies": [
"Prompt requested a wicker basket; none is visible"
],
"image_name": "bike.png",
"image_storage_url": "https://storage.example.com/org-42/project-7/bike.png?expires=7200&signature=...",
"matches": [
"Red vintage bicycle is present",
"Brick wall background as requested"
],
"overall_assessment": "The image closely matches the prompt with one minor omission."
},
"message": "Image analysis completed successfully",
"success": true
}