Object Visibility & Quality Detection Documentation
Complete API reference, integration examples, authentication guidelines, and response structures.
Overview
Advanced computer vision inspection microservice powered by Cylium Vision and OpenCV. Assesses object framing, optical blur (Laplacian variance), partial occlusion, and border cropping.
https://vgdt.cyliumos.onlineAuthentication
Authenticate every HTTP request using the custom X-API-Key header:
Do not expose your private key in client-side applications. Proxy requests through your backend service or Edge Workers.
Code Examples
curl -X POST "https://vgdt.cyliumos.online/detect-visibility" \
-H "Content-Type: application/json" \
-H "X-API-Key: cyk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
"image": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
"detection_point": true
}'Object Visibility & Quality Detection API
Automated computer vision quality inspection evaluating sharpness, obstruction, and framing margins.
Authentication
Pass your universal API key in the X-API-Key header:
X-API-Key: cyk_live_...
Endpoints
POST /detect-visibility(JSON payload)POST /detect-visibility/upload(Multipart file upload)
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Yes | application/json or multipart/form-data |
X-API-Key | string | Yes | Universal API Key generated from dashboard |
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
image_url | string | Cond. | Public URL to image |
image_base64 | string | Cond. | Base64-encoded image string |
image_path | string | Cond. | Local server path (testing) |
(Supply exactly ONE of image_url, image_base64, or image_path)
Response Schema (200 OK)
{
"object_name": "Red Apple",
"visibility": true,
"confidence": 0.98,
"message": "The apple is centrally positioned, sharp, and clearly visible.",
"is_blurry": false,
"is_occluded": false,
"is_cut_off": false,
"blur_score": 312.4,
"cached": false
}
Code Examples
cURL (URL Input)
curl -X POST "http://localhost:8003/detect-visibility" \
-H "Content-Type: application/json" \
-H "X-API-Key: cyk_live_x9z0abcdef" \
-d '{
"image_url": "https://example.com/product.jpg"
}'
cURL (File Upload)
curl -X POST "http://localhost:8003/detect-visibility/upload" \
-H "X-API-Key: cyk_live_x9z0abcdef" \
-F "[email protected]"
TypeScript / JavaScript
const res = await fetch("http://localhost:8003/detect-visibility", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "cyk_live_x9z0abcdef",
},
body: JSON.stringify({ image_url: "https://example.com/item.png" }),
});
const data = await res.json();
console.log("Visible:", data.visibility, "Blur Score:", data.blur_score);
Error Codes
| Status | Error Code | Description |
|---|---|---|
| 400 | invalid_image | Corrupt or empty image buffer |
| 401 | missing_api_key | X-API-Key header missing |
| 401 | invalid_api_key | Key not found in Firestore |
| 403 | service_not_subscribed | User has not subscribed to visibility-detection |
| 413 | image_too_large | Image exceeds 10 MB limit |
| 415 | unsupported_format | Image format not supported |
| 502 | vision_provider_error | Upstream Cylium Vision failure |
Status & Error Responses
{
"detail": {
"success": false,
"error": "invalid_payload",
"message": "Invalid request payload"
}
}{
"detail": {
"success": false,
"error": "missing_api_key",
"message": "X-API-Key header is required"
}
}{
"detail": {
"success": false,
"error": "subscription_required",
"message": "An active subscription is required to access this service"
}
}{
"detail": {
"success": false,
"error": "api_key_expired",
"message": "API key has expired or is revoked"
}
}{
"detail": {
"success": false,
"error": "rate_limit_reached",
"message": "Monthly API request limit reached"
}
}{
"detail": {
"success": false,
"error": "internal_error",
"message": "Internal processing error"
}
}Sample Response
Example payload structure returned by this service.
{
"object_name": "Product Bottle",
"visibility": true,
"confidence": 0.98,
"message": "The bottle is centrally positioned, well-lit, sharp, and clearly visible.",
"is_blurry": false,
"is_occluded": false,
"is_cut_off": false,
"blur_score": 312.4,
"cached": false
}Head over to the playground to upload your own files and inspect live bounding boxes and classifications.
Open Playground