AI model / Live test / API documentation
Developer documentation

Fire detection API

Use the same verified model catalogue, JSON prediction and server-annotated image endpoints that power the live fire demonstration.

Endpoint 1

List available models

GET/api/v1/models

Returns the model IDs, names and versions published by the detection backend.

curl https://www.detectium.io/api/v1/models \
  -H "Accept: application/json"
Endpoint 2

Predict bounding boxes

POST/api/v1/predict

Use multipart/form-data with an image file and model_name. The public fire demo always sends fire-latest.

curl -X POST https://www.detectium.io/api/v1/predict \
  -H "Accept: application/json" \
  -F "[email protected]" \
  -F "model_name=fire-latest"
Endpoint 3

Return an annotated JPEG

POST/api/v1/predict/image

Accepts the same multipart fields and returns the model's server-generated marked image. This is the image displayed in the live demo.

curl -X POST https://www.detectium.io/api/v1/predict/image \
  -H "Accept: image/jpeg" \
  -F "[email protected]" \
  -F "model_name=fire-latest" \
  --output annotated-fire.jpg
JSON response

Structured prediction result

Bounding-box coordinates are expressed in source-image pixels and confidence values range from 0 to 1.

{
  "summary": {
    "total_detections": 1,
    "flame_count": 1,
    "smoke_count": 0,
    "highest_confidence": 0.88
  },
  "metadata": {
    "width": 931,
    "height": 624,
    "format": "PNG"
  },
  "predictions": [
    {
      "xmin": 329.2,
      "ymin": 0,
      "xmax": 622.8,
      "ymax": 401.4,
      "confidence": 0.88,
      "class": 1,
      "name": "flame"
    }
  ]
}
Errors and limits

HTTP responses

422The multipart request failed backend validation.
413The upload exceeds 8 MB.
415The request is not multipart/form-data.
429The request limit was reached; retry later.
502The detection backend is temporarily unavailable.

This API is a demonstration interface. Its output is not a fire alarm and must not replace certified fire-safety systems, procedures or human assessment.