Integration Guide
Your IP camera captures the images — the API reads the plates. This guide covers the most common ways to connect existing camera infrastructure for real-time license plate recognition, from zero-code camera triggers to full RTSP pipelines.
The recognition service is a cloud REST API: you send an image to POST /v1/detect, it returns the plate data as JSON in under 200ms. The only architectural question is how frames get from your camera to the API.
There are four practical approaches, depending on your cameras and how much control you want. Most deployments start with Method 1 or 2 and never need anything more.
IP Camera
RTSP / HTTP / FTP
Recognition API
POST /v1/detect
Your System
PMS, app, dashboard
Before picking a method, decide when frames should be sent. This choice drives both accuracy and cost.
The camera (or a sensor, loop, or VMS rule) fires one snapshot when a vehicle is detected, and only that frame goes to the API.
A script samples the RTSP stream at a fixed rate (typically 1 – 2 frames per second) and sends each frame — optionally gated by motion detection.
Method 1 · Recommended — zero server needed
Best for: Axis, Hikvision, Dahua, Milesight, and other cameras with HTTP event actions.
Many modern IP cameras can send an HTTP POST with a snapshot when they detect motion or a vehicle. Point that action directly at the API and you have plate recognition with no server, no middleware, and no code.
URL: https://api.example.com/v1/detect
Method: POST
Header: Authorization: Bearer YOUR_API_KEY
Body: multipart form-data, image file in field "image"
Pros: No server or middleware — the camera talks directly to the cloud.
Cons: Requires a camera with HTTP POST events and internet access from the camera network.
Method 2
Best for: Any camera with an RTSP stream — which is nearly every IP camera made in the last decade.
Run a lightweight script on any machine on the camera network — a Raspberry Pi, a spare PC, or an existing server. It grabs frames from the RTSP stream and posts them to the API. You get full control over capture frequency, motion gating, and what happens with each result.
Python + OpenCV example
import cv2
import requests
import time
import io
API_URL = "https://api.example.com/v1/detect"
API_KEY = "YOUR_API_KEY"
CAMERA_RTSP = "rtsp://admin:[email protected]:554/stream"
cap = cv2.VideoCapture(CAMERA_RTSP)
while True:
ret, frame = cap.read()
if not ret:
continue
# Encode frame as JPEG
_, buffer = cv2.imencode('.jpg', frame)
image_bytes = io.BytesIO(buffer.tobytes())
# Send to the recognition API
response = requests.post(
API_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
files={"image": ("frame.jpg", image_bytes, "image/jpeg")},
)
result = response.json()
for plate in result.get("plates", []):
print(f"Plate: {plate['text']} "
f"({plate['confidence'] * 100:.1f}% confidence)")
time.sleep(1) # 1 frame per second is enough for parking
cap.release()Pros: Works with any RTSP camera. Full control over logic and rate.
Cons: Requires a machine running 24/7 and a script you own.
Method 3
Best for: Cameras that save snapshots to FTP on motion or event triggers.
Many cameras can drop a JPEG onto an FTP server when they detect motion. A small folder-watcher script picks up each new file, posts it to the API, and moves it to a processed directory. Simple, robust, and easy to debug — every frame is a file you can inspect.
import os
import time
import requests
WATCH_DIR = "/path/to/ftp/snapshots"
PROCESSED_DIR = "/path/to/processed"
API_URL = "https://api.example.com/v1/detect"
API_KEY = "YOUR_API_KEY"
while True:
for filename in os.listdir(WATCH_DIR):
if filename.lower().endswith(('.jpg', '.jpeg', '.png')):
filepath = os.path.join(WATCH_DIR, filename)
with open(filepath, 'rb') as f:
response = requests.post(
API_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
files={"image": f},
)
print(f"{filename}: {response.json()}")
# Move to processed folder
os.rename(filepath, os.path.join(PROCESSED_DIR, filename))
time.sleep(2)Pros: Simple and reliable; works with cameras that support FTP but not HTTP events.
Cons: Slightly higher latency than a direct HTTP event; needs an FTP server.
Method 4
Best for: Sites already running a video management system — Milestone, Genetec, Blue Iris, and similar.
Use the VMS event engine you already have: export a snapshot on vehicle or motion detection, POST it to the API from the VMS webhook or scripting feature, and route the JSON response into your application. Most VMS platforms support HTTP actions on events out of the box.
Pros: Reuses your existing detection rules, recording, and monitoring.
Cons: Setup details vary by VMS; consult its documentation for HTTP actions.
Instead of reading the API response synchronously, you can register a webhook endpoint and have recognition results pushed to your server as they are produced.
This suits asynchronous pipelines — results delivered straight into your parking management system, access-control software, or database, with your capture side kept completely dumb.
For payload details and configuration, see the API documentation.
Recognition accuracy is decided at the camera, not in the cloud. These six rules cover almost every failed read we see:
Resolution
Minimum 1080p. The plate should be at least 100 pixels wide in the frame — zoom in with the lens, not in software.
Angle
Mount at a 15 – 30° downward angle and within about 30° horizontally of the plate. Extreme side angles compress characters and cut accuracy sharply.
Height and distance
For gates and barriers, 4 – 8 feet high and 10 – 15 feet from where vehicles stop works best. Closer than 6 feet risks the plate leaving the frame.
IR at night
Use cameras with built-in IR illumination for 24/7 operation. Plates are retroreflective — a modest IR source at the right angle outperforms any megapixel upgrade after dark.
Shutter speed
Motion blur is the top cause of failed reads on moving vehicles. Set a fixed shutter of 1/500s or faster for rolling traffic (1/1000s for faster lanes) rather than leaving auto-exposure to choose.
Image format
Send JPEG at 80%+ quality (PNG and WebP also accepted, max 10MB, min 640x480). Avoid heavy compression — artifacts around characters read as strokes.
Get an API key, send a snapshot from your own camera, and read the JSON — 150 free calls per month, no credit card required.