Computer Vision APIAdvanced image and video analysis powered by AI
Comprehensive computer vision capabilities including image classification, object detection, face recognition, and video analysis.
Vision API
Overview
Computer Vision API
Our Computer Vision API provides state-of-the-art image and video analysis capabilities. Process images and videos to extract insights, classify objects, detect faces, and analyze visual content with industry-leading accuracy.
Base URL
https://api.litends.com/v2/vision
Supported Formats
- Images: JPEG, PNG, WebP, BMP
- Videos: MP4, AVI, MOV, WebM
- Max file size: 50MB
- Max resolution: 4K
Key Features
- Object detection & classification
- Face detection & recognition
- Optical character recognition
- Video content analysis
Image Classification
POST
/v2/vision/classify
Classify objects and scenes in images
Parameters
Name | Type | Required | Description |
---|---|---|---|
image_url | string | Optional | URL of the image to classify |
image_data | string | Optional | Base64 encoded image data |
max_results | integer | Optional | Maximum number of classifications to return (default: 10) |
confidence_threshold | float | Optional | Minimum confidence score (0.0-1.0, default: 0.5) |
Request Example
JSON
{
"image_url": "https://example.com/image.jpg",
"max_results": 5,
"confidence_threshold": 0.7
}
Response Example
JSON
{
"classifications": [
{
"label": "Golden Retriever",
"confidence": 0.92,
"category": "animal"
},
{
"label": "Dog",
"confidence": 0.89,
"category": "animal"
},
{
"label": "Pet",
"confidence": 0.78,
"category": "general"
}
],
"image_properties": {
"width": 1920,
"height": 1080,
"format": "jpeg"
},
"processing_time_ms": 125
}
POST
/v2/vision/analyze
Comprehensive image analysis including objects, faces, and text
Parameters
Name | Type | Required | Description |
---|---|---|---|
image_url | string | Optional | URL of the image to analyze |
image_data | string | Optional | Base64 encoded image data |
features | array | Optional | Analysis features to enable: ["objects", "faces", "text", "colors"] |
include_metadata | boolean | Optional | Include detailed metadata in response |
Request Example
JSON
{
"image_data": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD...",
"features": ["objects", "faces", "text"],
"include_metadata": true
}
Response Example
JSON
{
"objects": [
{
"name": "person",
"confidence": 0.94,
"bounding_box": {
"x": 120, "y": 50,
"width": 200, "height": 300
}
}
],
"faces": [
{
"confidence": 0.98,
"bounding_box": {
"x": 150, "y": 75,
"width": 80, "height": 100
},
"emotions": {
"happiness": 0.85,
"surprise": 0.12
}
}
],
"text": [
{
"text": "Welcome to AI",
"confidence": 0.96,
"bounding_box": {
"x": 50, "y": 400,
"width": 300, "height": 40
}
}
],
"processing_time_ms": 189
}
Object Detection
POST
/v2/vision/detect
Detect and locate objects in images
Parameters
Name | Type | Required | Description |
---|---|---|---|
image_url | string | Optional | URL of the image to process |
image_data | string | Optional | Base64 encoded image data |
object_types | array | Optional | Specific object types to detect |
min_confidence | float | Optional | Minimum detection confidence (default: 0.6) |
Request Example
JSON
{
"image_url": "https://example.com/street-scene.jpg",
"object_types": ["person", "car", "bicycle", "traffic_light"],
"min_confidence": 0.7
}
Response Example
JSON
{
"detections": [
{
"object": "person",
"confidence": 0.94,
"bounding_box": {
"x": 245,
"y": 120,
"width": 85,
"height": 180
}
},
{
"object": "car",
"confidence": 0.89,
"bounding_box": {
"x": 450,
"y": 200,
"width": 200,
"height": 120
}
}
],
"total_objects": 2,
"processing_time_ms": 156
}
Video Analysis
POST
/v2/vision/video/analyze
Analyze video content for objects, activities, and scenes
Parameters
Name | Type | Required | Description |
---|---|---|---|
video_url | string | Optional | URL of the video to analyze |
video_data | string | Optional | Base64 encoded video data |
frame_interval | integer | Optional | Analyze every Nth frame (default: 30) |
features | array | Optional | Analysis features: ["objects", "activities", "scenes"] |
Request Example
JSON
{
"video_url": "https://example.com/video.mp4",
"frame_interval": 15,
"features": ["objects", "activities"]
}
Response Example
JSON
{
"video_info": {
"duration": 120.5,
"fps": 30,
"resolution": "1920x1080",
"total_frames": 3615
},
"timeline": [
{
"timestamp": 0.5,
"objects": ["person", "bicycle"],
"activities": ["cycling"],
"confidence": 0.91
},
{
"timestamp": 1.0,
"objects": ["person", "bicycle", "car"],
"activities": ["cycling", "driving"],
"confidence": 0.88
}
],
"summary": {
"dominant_objects": ["person", "car", "bicycle"],
"main_activities": ["cycling", "walking", "driving"],
"scene_type": "urban_street"
},
"processing_time_ms": 4500
}
Ready to add computer vision to your app?
Start processing images and videos with our powerful computer vision APIs. From simple classification to complex video analysis.