The Image Validation API processes image URLs or uploads to provide comprehensive details such as dimensions, type, file size, and format, reports frame count, animation duration, color depth, and transparency for GIFs, and include image optimization capabilities.
Returns the results of an image validation test.
A 200 response
object | |
object |
A 401 response
A 404 response
{- "meta": {
- "status": "Completed"
}, - "items": {
- "id": "67a654ba0f53254b9fdca3e2",
- "images": [
- {
- "status": "Valid",
- "passes": [
- {
- "id": "image_file_size_check",
- "rule": "File Size Acceptable",
- "description": "Image file size (2000 bytes) is within the acceptable limit",
- "details": [
- {
- "file_size": 2000
}
]
}
], - "failures": [
- {
- "id": "load_time_check",
- "rule": "Slow Load Time",
- "description": "Image load time is 6000 ms, which exceeds the threshold of 2000 ms",
- "impact": "moderate",
- "recommendation": "Optimize the image or server performance to reduce load time.",
- "details": [
- {
- "load_time_ms": 6000
}
]
}
], - "informational": [
- {
- "id": "image_format_check",
- "rule": "Image Format Detected",
- "description": "The detected format is JPEG",
- "details": [
- {
- "format": "JPEG"
}
]
}
]
}
]
}
}
Delete a specific image validation test by its unique test ID. This endpoint allows you to remove an image validation test from the system. If the test ID does not exist, the appropriate error message is returned.
{- "message": "Image validation test with test id <id> has been successfully deleted."
}
Retrieve a paginated list of all image validation tests that have been submitted. The response is paginated, with a limit of up to 1000 items per page. The total count of records will display in the meta object under the key, 'count'.
A 200 response
object | |
object | |
Array of objects |
A 400 response
A 401 response
{- "meta": {
- "count": 17
}, - "items": [
- {
- "id": "67a654ba0f53254b9fdca3e2",
- "images": [
- {
- "id": "67a62ccd8824a77a474bc307",
- "status": "Valid"
}, - {
- "id": "67b625524b911fa30a4d784c",
- "status": "Valid",
- "-": {
- "alt": "Harlem Hip-Hop Walking Tour",
- "width": "276",
- "class": "image_resp image_style border_radius_8px",
- "style": "width: 100% !important; height: auto !important; display: block; border-radius: 8px; -webkit-border-radius: 8px; -moz-border-radius: 8px; border-width: 0;"
}
}
]
}
]
}
Create an image validation test.
A 200 response
object | |
object |
A 400 response
A 401 response
{ }
{- "meta": {
- "status": "Processing"
}, - "items": {
- "id": "67a654ba0f53254b9fdca3e2",
}
}
Create an image validation test with HTML
A 200 response
object | |
object |
A 400 response
A 401 response
{ }
{- "meta": {
- "status": "Complete"
}, - "items": {
- "id": "67b625524b911fa30a4d7858",
}
}
Create an image validation test by image upload
A 200 response
object | |
object |
A 400 response
A 401 response
{ }
{- "meta": {
- "status": "Complete"
}, - "items": {
- "id": "67b629564b911fa30a4d7873",
- "images": [
- {
- "id": "67b629564b911fa30a4d7872",
- "status": "Valid"
}
]
}
}
Reprocess an image validation test.
A 200 response
object | |
object |
A 400 response
A 401 response
{- "meta": {
- "status": "Processing"
}, - "items": {
- "id": "67a654ba0f53254b9fdca3e2",
}
}
Optimizes images by test id
A 200 response
object | |
object | |
Array of objects |
A 401 response
A 404 response
{- "meta": {
- "status": "Completed"
}, - "items": [
- {
- "id": "67b5fc304b911fa30a4d7834",
- "optimized_images": [
- {
- "id": "67b5fc304b911fa30a4d7835",
- "original_image_id": "67a654ba0f53254b9fdca3e0",
- "optimized_file_size": "361.16KB",
- "optimized_mime_type": "image/gif",
- "status": "Complete"
}, - {
- "id": "67b5fc304b911fa30a4d7836",
- "original_image_id": "67a654ba0f53254b9fdca3e1",
- "optimized_file_size": "969.33KB",
- "optimized_mime_type": "image/gif",
- "status": "Complete"
}
]
}
]
}
Optimizes a single image by test id
A 200 response
object | |
object | |
object |
A 401 response
A 404 response
{- "meta": {
- "status": "Completed"
}, - "items": {
- "optimized_images": [
- {
- "id": "67b5fc304b911fa30a4d7836",
- "original_image_id": "67b618d04b911fa30a4d783f",
- "optimized_file_size": "969.33KB",
- "optimized_mime_type": "image/gif",
- "status": "Complete"
}
]
}
}