Image Analyzer › Analyze Image
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).
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 Authorization string header required
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body multipart/form-data original_prompt string required
Response 200▼
application/json Successful Response
success boolean required
Whether the analysis was successful
message string required
Status message
data object
Analysis results
error string
Error message if analysis failed
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
}