Integrate Vision AI Into Your Code

Trigger REST API pipelines, ingest real-time JSON metadata with our Python SDK, and configure secure HTTP webhook endpoints for automated workflows.

Python SDK Reference

The `bajstox` Python SDK allows developers to connect to edge nodes, download configurations, and run inference loops locally.

  • Simple pip installation
  • OAuth2 API key authentication
  • Process standard NumPy arrays & OpenCV frames
# Install the package
pip install bajstox-ai

# Initialize the client
import bajstox as bx

client = bx.Client(api_key="your_api_token_here")

# Stream bounding box details from camera node
for frame in client.stream_camera(node_id="cam_04_south"):
    for obj in frame.predictions:
        print(f"Object: {obj.label} | Confidence: {obj.confidence}")
        if obj.label == "person" and not obj.has_ppe("helmet"):
            client.trigger_alert(
                type="safety_warning",
                msg="Worker detected without helmet."
            )

HTTP REST Reference

For non-Python environments, fetch active camera metrics and deploy new models using standard HTTP calls.

Endpoint: POST https://api.bajstox.ai/v1/models/deploy
Header: Authorization: Bearer <Token>

curl -X POST https://api.bajstox.ai/v1/models/deploy \
  -H "Authorization: Bearer your_api_token" \
  -H "Content-Type: application/json" \
  -d '{
    "node_id": "cam_04_south",
    "model_id": "ppe-verification-v4",
    "edge_compile": true
  }'

# JSON Response Output
# {
#   "status": "success",
#   "deployment_id": "dep_91a4c",
#   "estimated_latency_ms": 12
# }

Webhook Event Handling

Receive automatic POST requests at your secure server endpoints when events occur inside your facilities.

  • HMACSha256 security verification signatures
  • Automated retry logic on 5xx codes
// Webhook HTTP POST JSON Payload sent to your server
{
  "event_type": "zone_intrusion",
  "timestamp": "2026-07-10T17:00:00Z",
  "site_id": "site_02_assembly",
  "node_id": "cam_02_hazard_zone",
  "data": {
    "intrusion_object": "person",
    "confidence": 0.97,
    "exclusion_zone_id": "zone_red_reactor_3"
  }
}

Need Custom OpenAPI Integrations?

Download our OpenAPI schema files or speak to an integration engineer.

Talk to Integrations Team