Fire detection API
Detect flames and smoke in camera images with the Kirkwood API.
What it detects
Check loading yards, waste areas and building entrances for flames or smoke.
- Detection
- Flames or smoke: a trash-can fire, burning dumpster, a vehicle on fire, smoke from a building.
- Outside the definition
- No fire or smoke. Grill smoke at a food stall, steam, vehicle exhaust, fog, dust.
Send a camera image.
Set KIRKWOOD_API_KEY on your server. Save a frame as frame.jpg.
import base64
import json
import os
import urllib.request
with open("frame.jpg", "rb") as frame:
image = base64.b64encode(frame.read()).decode()
body = json.loads('''{
"images": [
"<BASE64_JPEG>"
],
"tags": [
"fire_smoke"
],
"detections": {
"return_boxes": true
}
}''')
body["images"] = [image]
request = urllib.request.Request(
"https://app.kirkwood.ai/v1/analyze",
data=json.dumps(body).encode(),
headers={
"Authorization": "Bearer " + os.environ["KIRKWOOD_API_KEY"],
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(request, timeout=120) as response:
print(json.dumps(json.load(response), indent=2))Read the result
Read tags.fire_smoke.answer and p_yes. Use the probability to decide which frames your monitoring team should review.
Camera setup
Use a clear view of the area you want to monitor. Include both day and night footage when testing the camera.
Try it on your footage.
Upload an image and select “Fire smoke”. Run analysis.
Approved account required. Analysis uses credit. Images are retained for annotation and training.
Open the live PlaygroundBefore you integrate
This tag covers flames and smoke together. Steam, fog, dust, vehicle exhaust and grill smoke are outside its positive definition.
Does fire detection also cover smoke?
Yes. Both use the fire_smoke tag and return one result. It is camera-based incident detection, not a replacement for a certified fire alarm system.
API pricing
Billed per image analyzed. Contact us for your rate.
Request pricing