Skip to main content

Miniviz API Reference (Image)

Miniviz API supports the following endpoints.

API Endpoint

Image Transmission API

POST https://api.miniviz.net/api/project/{project_id}/image?token={token}

Request Overview

Image transmission to Miniviz API uses the POST method. Pass the project token with the ?token={token} query parameter. The request body is in JSON format. Image data is base64 encoded before transmission.

Request Body (Image Transmission)

Field NameTypeRequiredDescription
timestampnumberYesTransmission time (UNIX time in milliseconds)
label_keystringYesLabel to identify the source, such as device name or location (max 128 characters, [A-Za-z0-9-_.:@/] only)
image_namestringYesImage file name (max 255 characters)
image_base64stringYesBase64 encoded image data (max 200KB)

Limitations

Image Size and Format

  • Image Size: Maximum 200KB per image (size after base64 encoding)
  • Supported Formats: JPEG and PNG only
  • Transmission Interval: 60 seconds/image (managed per label key)
  • Retention Period: 365 days

Plan Restrictions

  • Available Plans: Pro plan only (403 error for free plan)

Request Example (Image Transmission)

{
"timestamp": 1717587812345,
"label_key": "camera_1",
"image_name": "image.jpg",
"image_base64": "base64_encoded_image_data"
}

curl Command (Linux/MacOS)


timestamp_ms=$(( $(date -u +%s) * 1000 ))

# Encode image file to base64
image_base64=$(base64 -i image.jpg)

curl -X POST \
"https://api.miniviz.net/api/project/{project_id}/image?token={token}" \
-H "Content-Type: application/json" \
-d "{
\"timestamp\": ${timestamp_ms},
\"label_key\": \"camera_1\",
\"image_name\": \"image.jpg\",
\"image_base64\": \"${image_base64}\"
}"

View Images

You can preview sent images from the database page.

View Images

View Images

You can also display images in graphs from the graph creation page.

[Create New Graph] -> [Select Graph Type] -> Select [image]

Create Image Graph