Skip to main content
POST
/
device
/
images
/
upload
curl -X POST https://acusight.io/api/device/images/upload \
  -H "X-Device-Key: adk_x9y8z7w6v5u4..." \
  -F "image=@/path/to/image.jpg" \
  -F 'metadata={"model_id":"mdl_123","model_version":"1.0.0","annotations":[{"class_value":"defect","type":"bbox","geometry":[0.52,0.48,0.2,0.1]}]}'
{
  "success": true,
  "data": {
    "image_id": "img_550e8400-e29b-41d4-a716-446655440000",
    "batch_id": "batch_660e8400-e29b-41d4-a716-446655440001",
    "storage_key": "raw-data/550e8400_image.jpg"
  }
}
Uploads an image from an edge device to the platform. This is used in cloud mode where devices cannot directly access MinIO.
This endpoint uses Device API Key authentication via the X-Device-Key header, not bearer token authentication.

Authentication

Include the device API key in the X-Device-Key header:
X-Device-Key: adk_<your-api-key>

Request

This endpoint accepts multipart/form-data:
image
file
required
The image file to upload (JPEG, PNG, etc.)
metadata
string
JSON string with annotation/model metadata

Response

image_id
string
Unique identifier for the uploaded image
batch_id
string
ID of the batch the image was added to
storage_key
string
MinIO object key for the uploaded image

Size Limits

  • Maximum file size: 50MB
  • Supported formats: JPEG, PNG
curl -X POST https://acusight.io/api/device/images/upload \
  -H "X-Device-Key: adk_x9y8z7w6v5u4..." \
  -F "image=@/path/to/image.jpg" \
  -F 'metadata={"model_id":"mdl_123","model_version":"1.0.0","annotations":[{"class_value":"defect","type":"bbox","geometry":[0.52,0.48,0.2,0.1]}]}'
{
  "success": true,
  "data": {
    "image_id": "img_550e8400-e29b-41d4-a716-446655440000",
    "batch_id": "batch_660e8400-e29b-41d4-a716-446655440001",
    "storage_key": "raw-data/550e8400_image.jpg"
  }
}

Notes

  • Images are automatically added to the device’s current collecting batch
  • If no active batch exists, a new one is created
  • The data service is notified automatically after upload
  • Duplicate images (by hash) may be rejected